File tree Expand file tree Collapse file tree 1 file changed +1
-41
lines changed
Expand file tree Collapse file tree 1 file changed +1
-41
lines changed Original file line number Diff line number Diff line change @@ -19,47 +19,7 @@ permissions:
1919
2020jobs :
2121 prepare :
22- runs-on : ubuntu-latest
23- outputs :
24- ref_name : ${{ steps.resolve.outputs.ref_name }}
25- version_number : ${{ steps.resolve.outputs.version_number }}
26- should_publish : ${{ steps.resolve.outputs.should_publish }}
27-
28- steps :
29- - name : Checkout source
30- uses : actions/checkout@v6
31- with :
32- fetch-depth : 0
33-
34- - name : Get latest tag if not push on tags
35- id : resolve
36- env :
37- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38- run : |
39- set -e
40-
41- EVENT="${{ github.event_name }}"
42-
43- if [[ "$EVENT" == "push" && "${GITHUB_REF_TYPE}" == "tag" ]]; then
44- TAG="${GITHUB_REF_NAME}"
45- else
46- TAG=$(git describe --tags --abbrev=0)
47- fi
48-
49- echo "Using tag: $TAG"
50-
51- # Check if release exists
52- if gh release view "$TAG" >/dev/null 2>&1; then
53- SHOULD_PUBLISH=false
54- echo "Release already exists for $TAG"
55- else
56- SHOULD_PUBLISH=true
57- echo "No release exists for $TAG"
58- fi
59-
60- echo "ref_name=$TAG" >> "$GITHUB_OUTPUT"
61- echo "version_number=${TAG#v}" >> "$GITHUB_OUTPUT"
62- echo "should_publish=$SHOULD_PUBLISH" >> "$GITHUB_OUTPUT"
22+ uses : git-mastery/actions/.github/workflows/get-latest-tag.yml@main
6323
6424 linux-build :
6525 needs : prepare
You can’t perform that action at this time.
0 commit comments