Skip to content

Commit

Permalink
fix(ci): upload apks as part of action-gh-release job
Browse files Browse the repository at this point in the history
  • Loading branch information
growse committed Sep 22, 2024
1 parent 146c888 commit df49a8a
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit df49a8a

Please sign in to comment.