Skip to content

Commit 6a66122

Browse files
committed
build: gh actions for pypi auto publish
1 parent 6012a5c commit 6a66122

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and upload to PyPI
2+
3+
# Only build on tagged releases
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
build:
11+
name: Build and upload sdist
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: mamba-org/setup-micromamba@v1
20+
with:
21+
generate-run-shell: true
22+
environment-file: environment.yml
23+
create-args: >-
24+
python=3.10
25+
26+
- name: Install py-build
27+
run: |
28+
python3 -m pip install --upgrade build
29+
30+
- name: Build
31+
run: |
32+
python3 -m build --sdist --wheel --outdir dist/
33+
34+
- name: Publish Package
35+
uses: pypa/gh-action-pypi-publish@master

0 commit comments

Comments
 (0)