-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 958 Bytes
/
publish_pypi_prod.yml
File metadata and controls
36 lines (33 loc) · 958 Bytes
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
name: Build and publish to PyPI
on:
release:
types: [created]
jobs:
check-release:
name: Reuse check release
uses: ./.github/workflows/check_release.yml
build:
name: Reuse build
uses: ./.github/workflows/build.yml
publish-to-pypi:
needs:
- check-release
- build
runs-on: ubuntu-latest
environment:
name: prod
url: https://pypi.org/p/reqstool-python-hatch-plugin
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
# Download artifacts from the build job
- name: Download Artifacts
uses: actions/download-artifact@v8
with:
name: dist
path: dist
- name: Publish distribution 📦 to PyPI
# if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
sign-artifacts: true