Skip to content

Commit 7725e5e

Browse files
committed
ci: Add semantic release workflow
1 parent 6c29d91 commit 7725e5e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Semantic Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
concurrency: release
12+
environment: release
13+
permissions:
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
token: ${{ secrets.GH_TOKEN }}
21+
22+
- name: Python Semantic Release
23+
id: release
24+
uses: python-semantic-release/python-semantic-release@master
25+
with:
26+
github_token: ${{ secrets.GH_TOKEN }}
27+
28+
- name: Publish to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
if: steps.release.outputs.released == 'true'
31+
32+
- name: Publish to GitHub Releases
33+
uses: python-semantic-release/upload-to-gh-release@main
34+
if: steps.release.outputs.released == 'true'
35+
with:
36+
github_token: ${{ secrets.GH_TOKEN }}

0 commit comments

Comments
 (0)