Skip to content

Commit adadf89

Browse files
committed
Add publish github action spec
1 parent 075da7f commit adadf89

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish Python distributions to PyPI
2+
3+
on: push
4+
jobs:
5+
build-n-publish:
6+
name: Build and publish Python distributions to PyPI
7+
runs-on: ubuntu-latest
8+
# We only execute this step if the commit is tagged, i.e., this is a release
9+
#if: startsWith(github.ref, 'refs/tags')
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@master
13+
- name: Set up Python 3.12
14+
uses: actions/setup-python@master
15+
with:
16+
python-version: "3.12"
17+
- name: Install pypa/build
18+
run: >-
19+
python3.12 -m
20+
pip install
21+
build
22+
--user
23+
- name: Build a binary wheel and a source tarball
24+
run: >-
25+
python3.12 -m
26+
build
27+
--sdist
28+
--wheel
29+
--outdir dist/
30+
.
31+
- name: Publish distribution to Test PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1.14
33+
with:
34+
repository_url: https://test.pypi.org/legacy/
35+
# - name: Publish distribution to PyPI
36+
# uses: pypa/gh-action-pypi-publish@master

0 commit comments

Comments
 (0)