Skip to content

Commit a672bb8

Browse files
committed
Add a PyPI test build-push GH action
1 parent 0e33afe commit a672bb8

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and deploy PyPI package
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
pypi-publish:
7+
name: Publish release to PyPI
8+
runs-on: ubuntu-latest
9+
environment:
10+
name: test-pypi
11+
url: https://test.pypi.org/project/bidscoin
12+
permissions:
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.x"
20+
- name: Remove raw HTML block from README.rst
21+
run: |
22+
sed -i '/^\.\. raw:: html/,+3d' README.rst
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install setuptools wheel build
27+
- name: Build package
28+
run: |
29+
python -m build
30+
- name: Publish package distributions to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
repository_url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)