Skip to content

Commit d950ecf

Browse files
committed
ci: add release workflow using semantic-release
1 parent 77187dd commit d950ecf

File tree

6 files changed

+7358
-146
lines changed

6 files changed

+7358
-146
lines changed

.github/workflows/package.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v5
15+
with:
16+
fetch-depth: 0
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v5
19+
with:
20+
node-version: 22
21+
- name: Install semantic-release
22+
run: npm install
23+
- name: Set up Python
24+
uses: actions/setup-python@v6
25+
with:
26+
python-version: '3.10'
27+
- name: Release
28+
env:
29+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
30+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
31+
run: npx semantic-release

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ ENV/
9797
.mypy_cache
9898

9999
.vscode
100-
100+
node_modules

.releaserc.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"branches": [
3+
"master"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
"@semantic-release/release-notes-generator",
8+
[
9+
"semantic-release-pypi",
10+
{
11+
"pypiPublish": false,
12+
"versionCmd": [
13+
"sed",
14+
"-i",
15+
"s/^__version__ = \".*\"/__version__ = \"${version}\"/",
16+
"fs/_version.py"
17+
]
18+
}
19+
],
20+
[
21+
"@semantic-release/github",
22+
{
23+
"assets": [
24+
{
25+
"path": "dist/fs*.whl",
26+
"label": "wheel"
27+
},
28+
{
29+
"path": "dist/fs*.tar.gz",
30+
"label": "sdist"
31+
}
32+
]
33+
}
34+
],
35+
[
36+
"@semantic-release/git",
37+
{
38+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
39+
"assets": [
40+
"CHANGELOG.md",
41+
"fs/_version.py"
42+
]
43+
}
44+
]
45+
]
46+
}

0 commit comments

Comments
 (0)