Skip to content

Commit b5b64a9

Browse files
authored
Update TestPyPI upload workflow configuration
1 parent 1ae69d9 commit b5b64a9

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Python 🐍 distribution 📦 to TestPyPI
2+
3+
on:
4+
push:
5+
- main
6+
workflow_dispatch:
7+
8+
9+
jobs:
10+
build:
11+
name: Build distribution 📦
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.x"
22+
23+
publish-to-testpypi:
24+
name: Publish Python 🐍 distribution 📦 to TestPyPI
25+
needs:
26+
- build
27+
runs-on: ubuntu-latest
28+
29+
environment:
30+
name: testpypi
31+
url: https://test.pypi.org/p/PyEPR-ESR
32+
33+
permissions:
34+
id-token: write # IMPORTANT: mandatory for trusted publishing
35+
36+
steps:
37+
- name: Download all the dists
38+
uses: actions/download-artifact@v4
39+
with:
40+
name: python-package-distributions
41+
path: dist/
42+
- name: Publish distribution 📦 to TestPyPI
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)