diff --git a/.github/workflows/Build-Apk.yml b/.github/workflows/Build-Apk.yml index de07998..f6d9874 100644 --- a/.github/workflows/Build-Apk.yml +++ b/.github/workflows/Build-Apk.yml @@ -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 diff --git a/.github/workflows/Build-Release.yml b/.github/workflows/Build-Release.yml index 14c7ff5..b5b9516 100644 --- a/.github/workflows/Build-Release.yml +++ b/.github/workflows/Build-Release.yml @@ -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