Skip to content

Commit a9b0e6d

Browse files
committed
parse full tag
1 parent 6541798 commit a9b0e6d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
permissions: write-all
1111
runs-on: ubuntu-latest
1212
env:
13-
TAG_NAME: ${{ github.event.inputs.tag }}
13+
FULL_RELEASE_TAG: ${{ github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name) }}
1414
steps:
1515
- name: Checkout sources
1616
uses: actions/checkout@v4
@@ -23,9 +23,13 @@ jobs:
2323
uses: gradle/actions/setup-gradle@v3
2424
with:
2525
gradle-version: 8.5
26+
- name: Extract tag name
27+
run: |
28+
echo "RELEASE_TAG=${FULL_RELEASE_TAG:10}"
29+
echo "RELEASE_TAG=${FULL_RELEASE_TAG:10}" >> $GITHUB_ENV
2630
- name: Build with Gradle
2731
id: build
28-
run: gradle -PgithubReleaseTag=${{ github.event.release.tag_name }} buildReleaseArtifacts
32+
run: gradle -PgithubReleaseTag=${{ env.RELEASE_TAG }} buildReleaseArtifacts
2933
- name: Release
3034
uses: softprops/action-gh-release@v2
3135
with:

0 commit comments

Comments
 (0)