Skip to content

Commit 85d96ef

Browse files
committed
Update GitHub workflows
* Update action versions * Use PyPI Trusted Publishing
1 parent ee19bed commit 85d96ef

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.github/workflows/publish-python-package.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ on:
77
jobs:
88
release:
99
runs-on: ubuntu-latest
10+
environment:
11+
name: pypi
12+
url: https://pypi.org/p/swf-typed
13+
permissions:
14+
id-token: write
1015
steps:
11-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1217
- name: Set up Python
13-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v5
19+
- name: Install build
20+
run: pip install build
1421
- name: Build package
15-
run: |
16-
pip install build
17-
pyproject-build
18-
- name: Publish package
19-
env:
20-
TWINE_USERNAME: __token__
21-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
22-
run: |
23-
pip install twine
24-
twine upload dist/*
22+
run: python -m build
23+
- name: Publish distribution
24+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test-python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
matrix:
1919
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install package

0 commit comments

Comments
 (0)