mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 03:32:38 +08:00
perf(actions): use outputs
This commit is contained in:
parent
b5b8b1dfe7
commit
ab68c5ac57
9
.github/workflows/Build-Apk.yml
vendored
9
.github/workflows/Build-Apk.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Apk-Build
|
||||
name: Build-Apk
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
@ -35,8 +35,7 @@ jobs:
|
|||
- run: chmod 777 ./gradlew
|
||||
- run: ./gradlew build
|
||||
|
||||
- name: Archive artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-outputs-apk.zip
|
||||
path: app/build/outputs/apk
|
||||
name: outputs.zip
|
||||
path: app/build/outputs
|
||||
|
|
35
.github/workflows/Build-Release.yml
vendored
35
.github/workflows/Build-Release.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Build Release
|
||||
name: Build-Release
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -32,38 +32,45 @@ jobs:
|
|||
- run: chmod 777 ./gradlew
|
||||
- run: ./gradlew build
|
||||
|
||||
- name: Upload Asset
|
||||
uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: app-release.apk
|
||||
path: app/build/outputs/apk/release/app-release.apk
|
||||
name: outputs
|
||||
path: app/build/outputs
|
||||
|
||||
release:
|
||||
needs: build
|
||||
permissions: write-all
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Asset
|
||||
uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: app-release.apk
|
||||
name: outputs
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
- id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: true
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: app-release.apk
|
||||
asset_path: outputs/apk/release/app-release.apk
|
||||
asset_name: gkd-${{ github.ref_name }}.apk
|
||||
asset_content_type: application/vnd.android.package-archive
|
||||
|
||||
- run: zip -r outputs.zip outputs
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: outputs.zip
|
||||
asset_name: outputs.zip
|
||||
asset_content_type: application/zip
|
||||
|
|
Loading…
Reference in New Issue
Block a user