-
Notifications
You must be signed in to change notification settings - Fork 24
47 lines (39 loc) · 1.19 KB
/
release.yml
File metadata and controls
47 lines (39 loc) · 1.19 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
name: Release
on: workflow_dispatch
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
# Install and run pre-commit
- run: |
pip install pre-commit
pre-commit install
pre-commit run --all-files
release:
needs: [pre-commit]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/trame-slicer
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog: true
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
- name: Publish package distributions to PyPI
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1