Skip to content

Commit 5fd340f

Browse files
committed
Add a PyPI-publishing job.
1 parent a87c1d7 commit 5fd340f

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This needs to be merged into a single workflow, called publish.yml, with the
2+
# wheel-building stuff, so it can share artifacts. I'm assuming the
3+
# wheel-building stuff lives in a job called "make-dists". If not, change the
4+
# below reference.
5+
6+
name: Publish to PyPI
7+
8+
on: [push]
9+
10+
jobs:
11+
publish:
12+
name: Publish any pushed version tag to PyPI
13+
# Publish to PyPI only on pushes of tags like "v1.2.3".
14+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
15+
needs:
16+
- make-dists
17+
runs-on: ubuntu-24.04
18+
environment:
19+
name: pypi
20+
url: https://pypi.org/p/fastly-compute
21+
permissions:
22+
id-token: write
23+
steps:
24+
- name: Download all the dists
25+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # @v6
26+
with:
27+
name: python-package-distributions
28+
path: dist/
29+
- name: Publish dists to PyPI
30+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # @release/v1

0 commit comments

Comments
 (0)