Skip to content

Commit c75e4c3

Browse files
committed
feat: add GitHub Actions workflow to publish package to PyPI.
1 parent f125c3e commit c75e4c3

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
pypi-publish:
10+
name: Upload release to PyPI
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi
14+
url: https://pypi.org/p/xpcs-viewer
15+
permissions:
16+
id-token: write
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.12'
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build twine
30+
31+
- name: Build package
32+
run: |
33+
python -m build
34+
35+
- name: Publish package distributions to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)