Skip to content

Commit 17178ae

Browse files
committed
Add build pipeline for automatic publishing
1 parent 338a207 commit 17178ae

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- v*
8+
jobs:
9+
build_wheels:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Install Poetry
15+
uses: snok/[email protected]
16+
- name: Build
17+
run: poetry build
18+
- uses: actions/upload-artifact@v3
19+
with:
20+
path: ./dist/*
21+
22+
upload_pypi:
23+
name: Upload to PyPI
24+
needs: [build_wheels]
25+
runs-on: ubuntu-latest
26+
environment: pypi
27+
permissions:
28+
id-token: write
29+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
30+
steps:
31+
- uses: actions/download-artifact@v3
32+
with:
33+
name: artifact
34+
path: dist
35+
36+
- uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
skip-existing: true

0 commit comments

Comments
 (0)