From df49a8af8dbbae28f641c9c6a560e219433fe8a0 Mon Sep 17 00:00:00 2001 From: Andrew Rowson Date: Sun, 22 Sep 2024 17:01:32 +0100 Subject: [PATCH] fix(ci): upload apks as part of action-gh-release job --- .github/workflows/release.yaml | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d2a3e4e75e..f5a4c0aec7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -90,6 +90,11 @@ jobs: - name: Extract changelog run: awk '/^## / { if (p) {exit}; { p=1; next} } p' CHANGELOG.md > this_release_changelog.md + - name: Move APKs to project root + run: | + mv project/app/build/outputs/apk/gms/release/app-gms-release.apk owntracks-release-gms-${{ env.VERSION_CODE }}.apk + mv project/app/build/outputs/apk/oss/release/app-oss-release.apk owntracks-release-oss-${{ env.VERSION_CODE }}.apk + - name: Create release id: create_release uses: softprops/action-gh-release@v2 @@ -101,25 +106,8 @@ jobs: name: ${{ github.ref_name }} draft: true prerelease: ${{ contains(github.ref_name, 'beta') }} - - - name: Upload GMS Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./project/app/build/outputs/apk/gms/release/app-gms-release.apk - asset_name: owntracks-release-gms-${{ env.VERSION_CODE }}.apk - asset_content_type: application/vnd.android.package-archive - - name: Upload OSS Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./project/app/build/outputs/apk/oss/release/app-oss-release.apk - asset_name: owntracks-release-oss-${{ env.VERSION_CODE }}.apk - asset_content_type: application/vnd.android.package-archive + files: | + ./owntracks-release-*.apk - name: Promote play store beta from internal run: ./gradlew promoteGmsReleaseArtifact --from-track internal --promote-track beta --release-status completed