File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release Pipeline
2+
3+ run-name : Releasing ${{ github.event.repository.name }}
4+
5+ on :
6+ workflow_dispatch
7+
8+ jobs :
9+ initialization :
10+ runs-on : ubuntu-latest
11+ if : github.ref == 'refs/heads/main' || github.ref_name == 'refs/heads/master'
12+ outputs :
13+ POM_VERSION : ${{steps.getVersion.outputs.POM_VERSION}}
14+ steps :
15+ - name : Get Current Version
16+ run : echo "POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
17+ - name : Verify Is SNAPSHOT Version
18+ if : ${{ !contains(env.POM_VERSION, '-SNAPSHOT')}}
19+ run : |
20+ echo "ERROR: Version is set to incompatible version ${{env.POM_VERSION}}. Only SNAPSHOT development versions can be converted to a release version."
21+ exit 1
22+ - name : Get Release Version
23+ run : |
24+ echo "RELEASE_VERSION=${env.POM_VERSION##-}" >> $GITHUB_ENV
25+ echo "Release version ${{env.RELEASE_VERSION}}"
26+
27+
28+
29+
30+
31+
32+
33+
You can’t perform that action at this time.
0 commit comments