-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (36 loc) · 1.04 KB
/
publish-to-test-pypi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: "[TestPyPI] 📦 Publish Python 🐍 distribution"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-package:
uses: ./.github/workflows/workflow-build-package.yml
with:
python_version: "3.x"
poetry_version: "1.5.1"
generate_temp_version: ${{ github.event_name == 'pull_request' && true || false }}
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build-package
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/hapless
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true