File tree 1 file changed +11
-10
lines changed
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish release
2
- run-name : Publish release ${GITHUB_REF#refs/*/ } on ${{ github.sha }} by @${{ github.actor }}
2
+ run-name : Publish release ${{ github.ref_name } } on ${{ github.sha }} by @${{ github.actor }}
3
3
4
4
on :
5
5
push :
@@ -14,16 +14,17 @@ jobs:
14
14
contents : read
15
15
packages : write
16
16
steps :
17
- - name : Get the Github Release version
18
- run : |
19
- ref=${GITHUB_REF#refs/*/}
20
- git show-ref --verify refs/tags/${ref} || { echo "Ref ${GITHUB_REF} is not a tag" ; exit 1; }
21
- echo "RELEASE_VERSION=${ref}" >> "$GITHUB_ENV"
22
-
23
- - name : Checkout tag ${{ env.RELEASE_VERSION }}
17
+ - name : Checkout
24
18
uses : actions/checkout@v4
25
- with :
26
- ref : ${{ env.RELEASE_VERSION }}
19
+
20
+ - name : Check release version
21
+ run : |
22
+ if [[ "${{ github.ref_type }}" == "tag" ]]; then
23
+ echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"
24
+ else
25
+ echo "Ref ${GITHUB_REF} is not a tag"
26
+ exit 1
27
+ fi
27
28
28
29
- name : Set up JDK 21
29
30
uses : actions/setup-java@v4
You can’t perform that action at this time.
0 commit comments