Skip to content

Commit d709c0a

Browse files
authored
Update poetry to 2.2.1 in GitHub Actions (#10)
1 parent e7b8b3c commit d709c0a

4 files changed

Lines changed: 253 additions & 153 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- "*"
77

88
jobs:
9-
build_and_upload:
10-
name: Build and upload
9+
build:
10+
name: Build
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout 🔁
@@ -16,21 +16,40 @@ jobs:
1616
- name: Set up Python 🐍
1717
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
1818
with:
19-
python-version: "3.10"
19+
python-version: "3.13"
2020

2121
- name: Install Poetry and pre-commit ⚙️
22-
run: pip install poetry==1.8.5 pre-commit
22+
run: pip install poetry==2.2.1 pre-commit
2323

2424
- name: Install dependencies 🛠
2525
run: poetry install
2626

2727
- name: Run tests 🚦
2828
run: poetry run invoke test
2929

30+
- name: Build the package 📦
31+
run: poetry build
32+
33+
- name: Publish build artifact ⬆️
34+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 #v5.0.0
35+
with:
36+
name: package-dist
37+
path: dist
38+
publish:
39+
name: Publish
40+
needs: build
41+
runs-on: ubuntu-latest
42+
environment: PyPI
43+
permissions:
44+
# this permission is mandatory for trusted publishing
45+
id-token: write
46+
steps:
47+
- name: Download build artifact ⬇️
48+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 #v6.0.0
49+
with:
50+
name: package-dist
51+
path: dist
52+
3053
- name: Publish package to PyPI 🙌
31-
run: |
32-
set -e
33-
poetry config http-basic.pypi "__token__" "${PYPI_TOKEN}"
34-
poetry publish --build
35-
env:
36-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
54+
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
55+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e #v1.13.0

.github/workflows/tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
13+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1414
steps:
1515
- name: Checkout 🔁
1616
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -21,7 +21,7 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222

2323
- name: Install Poetry and pre-commit ⚙️
24-
run: pip install poetry==1.8.5 pre-commit
24+
run: pip install poetry==2.2.1 pre-commit
2525

2626
- name: Install dependencies 🛠
2727
run: poetry install

0 commit comments

Comments
 (0)