|
a |
|
b/.github/workflows/release.yaml |
|
|
1 |
name: Release |
|
|
2 |
|
|
|
3 |
on: |
|
|
4 |
release: |
|
|
5 |
types: [published] |
|
|
6 |
|
|
|
7 |
# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/ |
|
|
8 |
jobs: |
|
|
9 |
release: |
|
|
10 |
name: Upload release to PyPI |
|
|
11 |
runs-on: ubuntu-latest |
|
|
12 |
environment: |
|
|
13 |
name: pypi |
|
|
14 |
url: https://pypi.org/p/nichecompass/ |
|
|
15 |
permissions: |
|
|
16 |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing |
|
|
17 |
steps: |
|
|
18 |
- uses: actions/checkout@v4 |
|
|
19 |
with: |
|
|
20 |
filter: blob:none |
|
|
21 |
fetch-depth: 0 |
|
|
22 |
- uses: actions/setup-python@v5 |
|
|
23 |
with: |
|
|
24 |
python-version: "3.9" |
|
|
25 |
cache: "pip" |
|
|
26 |
- run: pip install build |
|
|
27 |
- run: python -m build |
|
|
28 |
- name: Publish package distributions to PyPI |
|
|
29 |
uses: pypa/gh-action-pypi-publish@release/v1 |