Skip to content

version increment: better workflow style #32

version increment: better workflow style

version increment: better workflow style #32

name: HyperCPU CI/CD Pipeline (version incrementing)

Check failure on line 1 in .github/workflows/version-increment.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/version-increment.yml

Invalid workflow file

(Line: 25, Col: 9): Unrecognized named-value: 'matrix'. Located at position 44 within expression: contains(github.event.head_commit.message, matrix.marker)
on:
push:
branches:
- master
jobs:
versioning-increment:
runs-on: ubuntu-latest
container:
image: hyperwin/hcpu-ci:debian-unstable
options: --user root
permissions:
contents: write
strategy:
matrix:
include:
- inc: patch
marker: '[ci patch inc]'
- inc: minor
marker: '[ci minor inc]'
if: contains(github.event.head_commit.message, matrix.marker)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v1
- name: Increment version (${{ matrix.inc }})
id: inc
run: |
tools/increment_version.py --increment ${{ matrix.inc }} >> $GITHUB_OUTPUT
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: "Increment ${{ matrix.inc }} version to ${{ steps.inc.outputs }}"