Skip to content

Commit ad21693

Browse files
authored
Create publish.yml
1 parent 9dcb85a commit ad21693

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/publish.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-release:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Build distributions
21+
run: |
22+
python -m pip install --upgrade pip
23+
python -m pip install build
24+
python -m build
25+
26+
- name: Upload distributions
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: tealer-dists
30+
path: dist/
31+
32+
publish:
33+
runs-on: ubuntu-latest
34+
environment: release
35+
permissions:
36+
id-token: write # For trusted publishing + codesigning.
37+
contents: write # For attaching signing artifacts to the release.
38+
needs:
39+
- build-release
40+
steps:
41+
- name: fetch dists
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: tealer-dists
45+
path: dist/
46+
47+
- name: publish
48+
uses: pypa/[email protected]
49+
50+
- name: sign
51+
uses: sigstore/[email protected]
52+
with:
53+
inputs: ./dist/*.tar.gz ./dist/*.whl
54+
release-signing-artifacts: true
55+
bundle-only: true

0 commit comments

Comments
 (0)