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