ci(github-actions): add actions to perform releases using maven-release-plugin
All checks were successful
Build / build (pull_request) Successful in 1m41s
All checks were successful
Build / build (pull_request) Successful in 1m41s
This commit is contained in:
parent
c9995eb309
commit
01fe45047a
3 changed files with 114 additions and 3 deletions
33
.github/workflows/validate-versions.yaml
vendored
Normal file
33
.github/workflows/validate-versions.yaml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: Validate release versions
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/project.yaml'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Retrieve project metadata
|
||||
uses: https://github.com/radcortez/project-metadata-action@master
|
||||
id: metadata
|
||||
with:
|
||||
metadata-file-path: '.github/project.yaml'
|
||||
local-file: true
|
||||
|
||||
- name: Validate current version
|
||||
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
|
||||
run: |
|
||||
echo '::error::Cannot release a SNAPSHOT version.'
|
||||
exit 1
|
||||
|
||||
- name: Validate next version
|
||||
if: contains(steps.metadata.outputs.next-version, 'SNAPSHOT') == false
|
||||
run: |
|
||||
echo '::error::Next development version should be a SNAPSHOT version.'
|
||||
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue