Skip to content

Commit 3b18157

Browse files
author
Mathias Bigaignon
committed
Fixes to github workflow
1 parent 6b43495 commit 3b18157

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,30 @@ permissions:
1717

1818
jobs:
1919
publish:
20-
21-
runs-on: ubuntu-latest
22-
20+
name: Build and publish package
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
python-version: [3.12]
25+
poetry-version: [1.8.3]
26+
os: [ubuntu-latest]
27+
runs-on: ${{ matrix.os }}
28+
environment: release
29+
permissions:
30+
id-token: write
2331
steps:
2432
- uses: actions/checkout@v4
2533
- name: Set up Python
2634
uses: actions/setup-python@v3
2735
with:
28-
python-version: "3.12"
29-
- name: Install Pipx
30-
run: |
31-
apt update
32-
apt install pipx
33-
pipx ensurepath
34-
- name: Install Poetry
35-
run: |
36-
pipx install poetry
37-
- name: Publish
38-
env:
39-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
36+
python-version: ${{ matrix.python-version }}
37+
- name: Setup poetry
38+
users: abatilo/[email protected]
39+
with:
40+
poetry-version: ${{ matrix.poetry-version }}
41+
- name: Building package distribution
4042
run: |
41-
poetry config pypi-token.pypi $PYPI_TOKEN
42-
poetry publish --build
43-
43+
poetry version ${{ github.ref_name }}
44+
poetry build
45+
- name: Publish to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)