-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.27 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (45 loc) · 1.27 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
name: Release
on:
push:
branches: [main]
permissions:
contents: write
id-token: write
jobs:
ci:
name: CI checks
uses: ./.github/workflows/ci.yml
release:
name: Semantic Release
needs: ci
runs-on: ubuntu-latest
if: github.repository_owner == 'sebtardif'
concurrency:
group: release
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to GitHub Releases
if: steps.release.outputs.released == 'true'
uses: python-semantic-release/publish-action@v9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build package
if: steps.release.outputs.released == 'true'
run: pip install build && python -m build
- name: Publish to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true