Repository navigation
61 lines (52 loc) · 1.76 KB
/
Copy pathsemver.yml
File metadata and controls
61 lines (52 loc) · 1.76 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Semantic Release
# Runs semantic-release on every push to main that touches the package. It analyses the
# Conventional Commits since the last X.Y.Z tag, decides the bump (none for docs/chore/ci),
# updates CHANGELOG.md + pyproject.toml, commits them, pushes the tag and creates the GitHub
# release. That release triggers publish.yml, which publishes to PyPI via OIDC.
#
# Tags have no v prefix (tagFormat "${version}"). 0.2.0 was released by hand on main (the
# earlier 0.1.x tags live only on the retired release/0.1.x branch), so releases continue
# from there in 0.x.
#
# Required secrets: GH_TOKEN (PAT with contents: write)
on:
push:
branches:
- main
paths:
- 'floci/**'
- 'tests/**'
- 'pyproject.toml'
- '.releaserc.json'
- '.github/workflows/semver.yml'
# One release at a time: semantic-release pushes a release commit and a tag, so overlapping
# runs from merges close together would race. Queue them; never cancel a release mid-way.
concurrency:
group: semantic-release
cancel-in-progress: false
permissions:
contents: write
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
persist-credentials: true
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install tomli-w (for version bump)
run: pip install tomli-w
- name: Run semantic-release
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}