Skip to content

Commit 9303406

Browse files
committed
added publish to testpypi workflow
1 parent be470dd commit 9303406

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish to TestPyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
actions: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
ref: ${{ github.ref }}
18+
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install Poetry
24+
run: python -m pip install --upgrade pip poetry
25+
26+
- name: Build dists
27+
run: poetry build
28+
29+
- name: Upload dist artifacts
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: python-dists
33+
path: dist/
34+
35+
publish-to-testpypi:
36+
needs: build
37+
runs-on: ubuntu-latest
38+
permissions:
39+
id-token: write
40+
actions: read
41+
steps:
42+
- name: Download dist artifacts
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: python-dists
46+
path: dist/
47+
48+
- name: Publish to TestPyPI via OIDC
49+
uses: pypa/gh-action-pypi-publish@release/v1
50+
with:
51+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)