Skip to content

Commit 3129719

Browse files
committed
Simplify tag name
1 parent 85b9c4d commit 3129719

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ jobs:
2626
run: ./gradlew build
2727
env:
2828
VERSION: ${{ github.ref }}
29+
- name: Find Tag
30+
id: tagger
31+
uses: jimschubert/query-tag-action@v2
32+
with:
33+
skip-unshallow: 'true'
34+
commit-ish: HEAD
2935
- run: |
30-
VERSION_J=$(echo $VERSION | cut -d'/' -f3)
31-
assets=$(find . -name "*${VERSION_J}*.jar" -or -name " *release.aar" | while read -r asset ; do echo "-a $asset" ; done)
32-
tag_name="${GITHUB_REF##*/}"
33-
hub release create ${assets} -m "$tag_name" "$tag_name"
36+
assets=$(find . -name "*${{steps.tagger.outputs.tag}}*.jar" -or -name " *release.aar" | while read -r asset ; do echo "-a $asset" ; done)
37+
hub release create ${assets} -m "${{steps.tagger.outputs.tag}}" "${{steps.tagger.outputs.tag}}"
3438
env:
3539
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
VERSION: ${{ github.ref }}
37-
- name: Publish ${{ github.ref }}
40+
VERSION: ${{steps.tagger.outputs.tag}}
41+
- name: Publish ${{steps.tagger.outputs.tag}}
3842
uses: burrunan/[email protected]
3943
with:
4044
remote-build-cache-proxy-enabled: false

0 commit comments

Comments
 (0)