Skip to content

Commit 14d7694

Browse files
authored
Merge pull request #37 from UniversalPython/release-ci-cd
use Trusted Publisher Management with Test PyPI
2 parents 1773e8e + b747a9a commit 14d7694

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Publish to Test PyPI
33
on:
44
push:
55
branches:
6-
- main
6+
- release
77

88
jobs:
99
deploy:
10-
name: Build and Publish to Test PyPI
10+
name: Build and Publish to PyPI
1111
runs-on: ubuntu-latest
1212

1313
steps:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to Test PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
name: Build and Publish to Test PyPI
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
id-token: write # Required for Trusted Publisher authentication
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install build twine
28+
29+
- name: Build package
30+
run: python -m build
31+
32+
- name: Publish to Test PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1
34+
with:
35+
repository-url: https://test.pypi.org/legacy/
36+
verbose: true

0 commit comments

Comments
 (0)