Skip to content

Commit 4263e03

Browse files
authored
Merge pull request #38 from jsonschema2dataclass/release-fixes
simplify tagging
2 parents 26c5c8d + 3129719 commit 4263e03

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,23 @@ 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-
assetsAAR=$(find . -name *release.aar | while read -r asset ; do echo "-a $asset" ; done)
31-
VERSION=$(echo $VERSION | cut -d'/' -f3)
32-
assetsJAR=$(find . -name *${VERSION}*.jar | while read -r asset ; do echo "-a $asset" ; done)
33-
tag_name="${GITHUB_REF##*/}"
34-
hub release create ${assetsAAR} ${assetsJAR} -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}}"
3538
env:
3639
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
VERSION: ${{ github.ref }}
38-
- name: Publish ${{ github.ref }}
40+
VERSION: ${{steps.tagger.outputs.tag}}
41+
- name: Publish ${{steps.tagger.outputs.tag}}
3942
uses: burrunan/[email protected]
4043
with:
4144
remote-build-cache-proxy-enabled: false
4245
properties: |
4346
gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
4447
gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
45-
arguments: publishPlugins -s --scan
48+
arguments: publishPlugins -s --scan

0 commit comments

Comments
 (0)