quarkus-commons/.github/workflows/validate-versions.yaml
Jorge Bornhausen 2844cff58a
Some checks failed
Build / build (push) Has been cancelled
Release the current version / Execute the release (push) Has been cancelled
ci(github-actions): use project-metadata-action@main instead of master
2025-06-18 01:57:56 +02:00

33 lines
No EOL
899 B
YAML

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@main
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