Skip to content

Commit d54aed0

Browse files
committed
ci: add release-gh to build-only.yml
1 parent e6b3c51 commit d54aed0

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/build-only.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,37 @@ jobs:
198198
with:
199199
name: aw-android
200200
path: dist/aw-android*.${{ matrix.type }}
201+
202+
release-gh:
203+
needs: [build-apk]
204+
if: startsWith(github.ref, 'refs/tags/v') # only on runs triggered from tag
205+
runs-on: ubuntu-latest
206+
steps:
207+
208+
# Will download all artifacts to path
209+
- name: Download release APK & AAB
210+
uses: actions/download-artifact@v3
211+
with:
212+
name: aw-android
213+
path: dist
214+
215+
- name: Display structure of downloaded files
216+
working-directory: dist
217+
run: ls -R
218+
219+
# detect if version tag is stable/beta
220+
- uses: nowsprinting/check-version-format-action@v2
221+
id: version
222+
with:
223+
prefix: 'v'
224+
225+
# create a release
226+
- name: Release
227+
uses: softprops/action-gh-release@v1
228+
with:
229+
draft: true
230+
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
231+
files: |
232+
dist/*.apk
233+
dist/*.aab
234+
# body_path: dist/release_notes/release_notes.md

0 commit comments

Comments
 (0)