Skip to content

Commit d222605

Browse files
committed
add publish workflow
1 parent 211e4dd commit d222605

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to PyPI
2+
on:
3+
push:
4+
paths: ["src/xpp/__init__.py", "pyproject.toml"]
5+
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
environment:
15+
name: pypi
16+
url: https://pypi.org/p/xpp
17+
permissions:
18+
id-token: write
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
cache: "pip"
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e . hatch
30+
- name: Build package
31+
run: hatch build
32+
- name: Publish to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)