Skip to content

Commit 742660e

Browse files
author
Paul Kyle
committed
ci: restore PyPI publish workflow
1 parent d0daca7 commit 742660e

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-dists:
11+
name: Build distributions
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.11"
21+
cache: "pip"
22+
23+
- name: Build sdist and wheel
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install build twine
27+
python -m build
28+
python -m twine check dist/*
29+
30+
- name: Upload distributions
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: release-dists
34+
path: dist/
35+
36+
publish-pypi:
37+
name: Publish to PyPI
38+
runs-on: ubuntu-latest
39+
needs: build-dists
40+
environment:
41+
name: pypi
42+
url: https://pypi.org/p/palinode
43+
permissions:
44+
id-token: write
45+
46+
steps:
47+
- name: Download distributions
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: release-dists
51+
path: dist/
52+
53+
- name: Publish package distributions to PyPI
54+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)