Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions .github/workflows/onPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,16 @@ jobs:
run: |
echo $VERSION_CODE > ./app/build/outputs/version_code.txt

- name: Create draft Github Pre-Release
- name: Create or update GitHub Pre-Release
if: github.event.inputs.beta == 'true'
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
tag_name: ${{ steps.rel_number.outputs.version }}
body_path: ./app/build/outputs/changelogGithub
draft: true
prerelease: true
files: |
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REL_VERSION: ${{ steps.rel_number.outputs.version }}
run: |
set -euo pipefail

assets=(
./app/build/outputs/apk/full/release/app-full-release.apk
./app/build/outputs/apk/minimal/release/app-minimal-release.apk
./app/build/outputs/version_code.txt
Expand All @@ -100,12 +101,20 @@ jobs:
./automotive/build/outputs/apk/minimal/release/automotive-minimal-release.apk
./strings.zip
./app/src/main/res/xml/locales_config.xml

- name: Publish Pre-Release
if: github.event.inputs.beta == 'true'
run: gh release edit ${{ steps.rel_number.outputs.version }} --draft=false
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
)

# If a release already exists for this tag, update its assets and release metadata.
if gh release view "$REL_VERSION" >/dev/null 2>&1; then
gh release upload "$REL_VERSION" "${assets[@]}" --clobber
Comment thread
TimoPtr marked this conversation as resolved.
Outdated
gh release edit "$REL_VERSION" \
--draft=false \
--prerelease \
--notes-file ./app/build/outputs/changelogGithub
else
gh release create "$REL_VERSION" "${assets[@]}" \
--prerelease \
--notes-file ./app/build/outputs/changelogGithub
fi

- name: Deploy to Firebase
env:
Expand Down