Skip to content

Commit e9ff959

Browse files
author
Elia Robyn Lake
committed
add github action
1 parent 6ccfaa4 commit e9ff959

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- uses: actions/setup-python@v3
13+
with:
14+
python-version: 3.11
15+
16+
- run: |
17+
pip install poetry
18+
poetry build
19+
20+
- uses: actions/upload-artifact@v3
21+
with:
22+
path: ./dist
23+
24+
pypi-publish:
25+
needs: ["build"]
26+
environment: "publish"
27+
28+
name: upload release to PyPI
29+
runs-on: ubuntu-latest
30+
permissions:
31+
# IMPORTANT: this permission is mandatory for trusted publishing
32+
id-token: write
33+
steps:
34+
- uses: actions/download-artifact@v3
35+
36+
- name: Publish package distributions to PyPI
37+
uses: pypa/gh-action-pypi-publish@release/v1
38+
with:
39+
packages_dir: artifact/

0 commit comments

Comments
 (0)