Skip to content

Commit

Permalink
Set release version to tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Apr 4, 2024
1 parent 070a110 commit d04a156
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
outputs:
SENTRY_RELEASE: ${{ steps.build.outputs.SENTRY_RELEASE }}
SENTRY_DIST: ${{ steps.build.outputs.SENTRY_DIST }}

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -27,6 +26,8 @@ jobs:
id: build
run: bash ${GITHUB_WORKSPACE}/Scripts/build.sh
working-directory: Scripts
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
- uses: actions/upload-artifact@v4
with:
path: |
Expand All @@ -39,8 +40,8 @@ jobs:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_DIST: ${{ needs.build_android.outputs.SENTRY_DIST }}
SENTRY_RELEASE: ${{ needs.build_android.outputs.SENTRY_RELEASE }}
SENTRY_RELEASE: ${{ steps.build.outputs.SENTRY_RELEASE }}
SENTRY_DIST: ${{ steps.build.outputs.SENTRY_DIST }}
release-job:
name: Releasing
needs: build_android
Expand Down
5 changes: 5 additions & 0 deletions Scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ if [[ "$(pwd)" == *"/Scripts" ]]; then
fi
VERSION="$(cat VERSION)"
BUILD_NUMBER="$(git rev-list HEAD --count)"
# Assumes tags start with V
if [[ -v RELEASE_TAG ]] && [[ -n $RELEASE_TAG ]]; then
TAG="${RELEASE_TAG,,}"
VERSION="${TAG//"v"}"
fi
flutter config --no-cli-animations
flutter pub get
flutter gen-l10n
Expand Down

0 comments on commit d04a156

Please sign in to comment.