-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.01 KB
/
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
30
31
32
33
34
35
name: publish package to pypi
on:
release:
types: [published, edited]
jobs:
build-and-publish-test:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: snok/[email protected]
- name: Publish to test-pypi
run: |
poetry config repositories.test https://test.pypi.org/legacy/
poetry config pypi-token.test ${{ secrets.TEST_PYPI_TOKEN }}
poetry publish --build --no-interaction --repository test
build-and-publish:
needs: build-and-publish-test
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: snok/[email protected]
- name: Publish to pypi
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build --no-interaction