From 18df8b10e1d69088d790200f5729b189e5abc805 Mon Sep 17 00:00:00 2001 From: Dr-Blank <64108942+Dr-Blank@users.noreply.github.com> Date: Wed, 18 Sep 2024 00:15:56 -0400 Subject: [PATCH] feat: add version extraction step to release workflow --- .github/workflows/flutter_release.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flutter_release.yaml b/.github/workflows/flutter_release.yaml index f338d43..d92259f 100644 --- a/.github/workflows/flutter_release.yaml +++ b/.github/workflows/flutter_release.yaml @@ -49,6 +49,16 @@ jobs: name: release-apk path: build/app/outputs/flutter-apk/app-release.apk + - name: version + id: version + run: | + tag=${GITHUB_REF/refs\/tags\//} + version=${tag#v} + major=${version%%.*} + echo "tag=${tag}" >> $GITHUB_OUTPUT + echo "version=${version}" >> $GITHUB_OUTPUT + echo "major=${major}" >> $GITHUB_OUTPUT + - name: Generate Release Notes id: generate_release_notes uses: release-drafter/release-drafter@v5 @@ -59,6 +69,6 @@ jobs: uses: ncipollo/release-action@v1 with: artifacts: build/app/outputs/flutter-apk/app-release.apk - name: ${{ github.ref_name }} + name: Release ${{ steps.version.outputs.version }} tag: ${{ github.ref }} - # body: ${{ steps.generate_release_notes.outputs.notes }} + body: ${{ steps.generate_release_notes.outputs.body }}