forked from siliconflow/BizyAir
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 878 Bytes
/
Copy pathsemver.yml
File metadata and controls
40 lines (31 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Semantic Versioning
on:
pull_request:
types: [ labeled ]
permissions:
contents: write
jobs:
update-semver:
if: contains(fromJSON('["major", "minor", "patch"]'), github.event.label.name)
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
- name: Get PR labels
id: pr-labels
uses: joerick/pr-labels-action@v1.0.9
- 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"