File tree Expand file tree Collapse file tree 1 file changed +1
-25
lines changed
Expand file tree Collapse file tree 1 file changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,6 @@ name: Deploy
1717
1818on :
1919 workflow_dispatch :
20- inputs :
21- tag-name :
22- description : ' Tag for deployment (e.g., v4.7.0)'
23- required : true
2420
2521jobs :
2622 deploy :
3733 - name : Checkout repository
3834 uses : actions/checkout@v3
3935 with :
36+ fetch-tags : true
4037 fetch-depth : 0 # Fetch all history for all tags and branches
4138
42- - name : Validate format of received tag
43- uses : actions/github-script@v7
44- with :
45- script : |
46- const newTag = core.getInput('tag-name');
47- const regex = /^v[0-9]+\.[0-9]+\.[0-9]+$/;
48- if (!regex.test(newTag)) {
49- core.setFailed('Tag does not match the required format "v[0-9]+.[0-9]+.[0-9]+". Valid example: v4.7.0');
50- return;
51- }
52- tag-name : ${{ github.event.inputs.tag-name }}
53-
54- - name : Define semantic version number
55- id : semantic_version
56- run : |
57- TAG_NAME="${{ github.event.inputs.tag-name }}"
58- VERSION=${TAG_NAME#v}
59- echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
60- - name : Checkout to tag
61- run : |
62- git checkout ${{ github.event.inputs.tag-name }}
6339 - name : Set up JDK 1.8
6440 uses : actions/setup-java@v1
6541 with :
You can’t perform that action at this time.
0 commit comments