-
Notifications
You must be signed in to change notification settings - Fork 9
29 lines (27 loc) · 867 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Prepare environment
run: |
chmod +x ./ci/prepare_env.sh && ./ci/prepare_env.sh
- name: Download release assets
run: |
mkdir -p dist
curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/$(echo $GITHUB_REF | grep -oE "[^/]+$")" |
grep "browser_download_url" | cut -d : -f 2,3 | tr -d '"' | wget -P dist -qi -
- name: Publish to pypi.org
env:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
run: |
poetry publish -u "$PYPI_USERNAME" -p "$PYPI_PASSWORD"