Skip to content

Commit 7756fc1

Browse files
author
leewang0
committed
add github publish action
1 parent e3aeca5 commit 7756fc1

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Upload Python Package
2+
on:
3+
push:
4+
branches: [ main ]
5+
6+
jobs:
7+
publish:
8+
name: publish
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.7'
18+
19+
- name: Publish to PyPI
20+
run: |
21+
pipx install poetry
22+
bash ./bin/publish-pypi
23+
env:
24+
PYPI_TOKEN: ${{ secrets.MERGE_PYPI_TOKEN }}

bin/publish-pypi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -eux
4+
poetry config pypi-token.pypi $PYPI_TOKEN
5+
poetry publish --build

0 commit comments

Comments
 (0)