File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 40
40
- name : Checkout
41
41
uses : actions/checkout@v4
42
42
with :
43
+ ref : ${{ inputs.ref }}
43
44
fetch-depth : 0
44
45
- name : Validate tag does not exist on current commit
45
46
uses : ./.github/workflows/validate-tag
51
52
echo "Tag should match pom.xml project.version"
52
53
exit 1
53
54
fi
55
+ - name : Validate version is a release version
56
+ run : |
57
+ if [[ "$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)" =~ "-SNAPSHOT" ]]; then
58
+ echo "This is a snapshot version"
59
+ exit 1
60
+ fi
54
61
55
62
release :
56
63
name : Release
Original file line number Diff line number Diff line change 13
13
type : boolean
14
14
15
15
jobs :
16
+ validate :
17
+ runs-on : ubuntu-latest
18
+ outputs :
19
+ is-snapshot : ${{ steps.validate.outputs.is-snapshot }}
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+ - name : Validate version is a snapshot version
23
+ id : validate
24
+ run : |
25
+ output=false
26
+ if [[ "$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)" =~ "-SNAPSHOT" ]]; then
27
+ echo "This is a snapshot version"
28
+ output=true
29
+ fi
30
+ echo "is-snapshot=$output" >> "$GITHUB_OUTPUT"
31
+
16
32
deploy :
17
33
name : Deploy
18
34
runs-on : ubuntu-latest
19
-
35
+ needs : validate
36
+ if : ${{ contains(needs.validate.outputs.is-snapshot, 'true') }}
20
37
steps :
21
38
- id : buildkite
22
39
name : Run Deploy
You can’t perform that action at this time.
0 commit comments