Skip to content

Commit d382f76

Browse files
Merge pull request #174 from akretion/publish-pypi
Pypi release
2 parents 1ec4a71 + 5dfa59d commit d382f76

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

.github/workflows/ci.yml

-13
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,3 @@ jobs:
3535
run: |
3636
python -m tox
3737
- uses: codecov/codecov-action@v3
38-
pypi-publish:
39-
name: Upload release to PyPI
40-
runs-on: ubuntu-latest
41-
environment:
42-
name: pypi
43-
url: https://pypi.org/p/roulier
44-
permissions:
45-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
46-
if: startsWith(github.ref, 'refs/tags')
47-
steps:
48-
# retrieve your distributions here
49-
- name: Publish package distributions to PyPI
50-
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
release:
3+
types:
4+
- published
5+
6+
name: release
7+
8+
jobs:
9+
pypi:
10+
name: upload release to PyPI
11+
runs-on: ubuntu-latest
12+
environment: release
13+
14+
permissions:
15+
# Used to authenticate to PyPI via OIDC.
16+
id-token: write
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- uses: actions/setup-python@v4
22+
with:
23+
python-version: ">= 3.8"
24+
25+
- name: build
26+
run: pipx run build
27+
28+
- name: publish
29+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)