From 270bbf1906bfbd463bb069ca10082a1dc36bdc9f Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 16 Dec 2023 10:56:00 +0000 Subject: [PATCH] ci: check semver on labelling PRs --- .github/workflows/semver.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/semver.yml diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml new file mode 100644 index 00000000..e649a6bc --- /dev/null +++ b/.github/workflows/semver.yml @@ -0,0 +1,49 @@ +name: Semver + +on: + pull_request: + types: [labeled] + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.label.name }} + cancel-in-progress: true + +jobs: + check-semver-patch: + name: Check semver (patch) + runs-on: ubuntu-latest + if: github.event.label.name == 'B-semver-patch' + steps: + - uses: actions/checkout@v4 + + - name: Check semver (patch) + uses: obi1kenobi/cargo-semver-checks-action@v2.1 + with: + release-type: patch + + check-semver-minor: + name: Check semver (minor) + runs-on: ubuntu-latest + if: github.event.label.name == 'B-semver-minor' + steps: + - uses: actions/checkout@v4 + + - name: Check semver (minor) + uses: obi1kenobi/cargo-semver-checks-action@v2.1 + with: + release-type: minor + + check-semver-major: + name: Check semver (major) + runs-on: ubuntu-latest + if: github.event.label.name == 'B-semver-major' + steps: + - uses: actions/checkout@v4 + + - name: Check semver (major) + uses: obi1kenobi/cargo-semver-checks-action@v2.1 + with: + release-type: major