Skip to content

Commit

Permalink
ci: add release-gh to build-only.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbrayo committed Jul 22, 2024
1 parent e6b3c51 commit d54aed0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,37 @@ jobs:
with:
name: aw-android
path: dist/aw-android*.${{ matrix.type }}

release-gh:
needs: [build-apk]
if: startsWith(github.ref, 'refs/tags/v') # only on runs triggered from tag
runs-on: ubuntu-latest
steps:

# Will download all artifacts to path
- name: Download release APK & AAB
uses: actions/download-artifact@v3
with:
name: aw-android
path: dist

- name: Display structure of downloaded files
working-directory: dist
run: ls -R

# detect if version tag is stable/beta
- uses: nowsprinting/check-version-format-action@v2
id: version
with:
prefix: 'v'

# create a release
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: ${{ !(steps.version.outputs.is_stable == 'true') }} # must compare to true, since boolean outputs are actually just strings, and "false" is truthy since it's not empty: https://github.com/actions/runner/issues/1483#issuecomment-994986996
files: |
dist/*.apk
dist/*.aab
# body_path: dist/release_notes/release_notes.md

0 comments on commit d54aed0

Please sign in to comment.