Add test header and semver ci #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Semantic Versioning | |
on: | |
pull_request: | |
types: [ labeled, opened ] | |
permissions: | |
contents: write | |
jobs: | |
update-semver: | |
if: (${{ github.event.action == 'labeled' }} && contains(fromJSON('["major", "minor", "patch"]'), github.event.label.name)) || (${{ github.event.action == 'opened' }} && (contains(github.event.pull_request.labels.*.name, 'major') || contains(github.event.pull_request.labels.*.name, 'minor') || contains(github.event.pull_request.labels.*.name, 'patch'))) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pip install semver argparse | |
- name: Get PR labels | |
id: pr-labels | |
uses: joerick/[email protected] | |
- name: Increment SemVer | |
run: | | |
python increment_version.py --labels ${{steps.pr-labels.outputs.labels}} | |
- name: Commit SemVer | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "auto update semantic version" |