Skip to content

Commit 3c3e04c

Browse files
authored
Update action for uploading to PyPI (#142)
1 parent 8c932b8 commit 3c3e04c

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
apt install -y libglu1-mesa libglib2.0-0 libfontconfig1 libegl-dev libxkbcommon-x11-0 xvfb libdbus-1-3
3333
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
3434
-
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@v4
3636
-
3737
name: Install
3838
shell: bash

.github/workflows/python-publish.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@ on:
55
types: [published]
66

77
jobs:
8-
deploy:
8+
dist:
99
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- uses: hynek/build-and-inspect-python-package@v2
16+
17+
publish:
18+
needs: [dist]
19+
environment: pypi
1020
permissions:
1121
id-token: write
22+
runs-on: ubuntu-latest
23+
if: github.event_name == 'release' && github.event.action == 'published'
24+
1225
steps:
13-
- uses: actions/checkout@v3
14-
- name: Set up Python
15-
uses: actions/setup-python@v4
26+
- uses: actions/download-artifact@v4
1627
with:
17-
python-version: '3.x'
18-
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install build
22-
- name: Build package
23-
run: python -m build
24-
- name: Publish a Python distribution to PyPI
25-
uses: pypa/gh-action-pypi-publish@release/v1
28+
name: Packages
29+
path: dist
30+
31+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)