Skip to content

Commit ced6fdf

Browse files
author
OmOmofonmwan
committed
Working on Releae POC
1 parent fe07518 commit ced6fdf

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/release_poc.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+

0 commit comments

Comments
 (0)