Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

Commit 2ec9bbb

Browse files
committed
Replace publish workflow
1 parent 238820c commit 2ec9bbb

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

.github/workflows/publish_pypi.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,22 @@
1-
name: publish package on pypi
1+
name: Publish package
22

33
on:
44
release:
55
types: [published, edited]
66

77
jobs:
88
build-and-publish-test:
9-
name: Build and publish
109
runs-on: ubuntu-latest
1110
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-python@v2
11+
- uses: snok/.github/workflows/publish@main
1412
with:
15-
python-version: 3.9
16-
- uses: snok/install-poetry@v1.1.1
17-
- name: Publish to test-pypi
18-
run: |
19-
poetry config repositories.test https://test.pypi.org/legacy/
20-
poetry config pypi-token.test ${{ secrets.TEST_PYPI_TOKEN }}
21-
poetry publish --build --no-interaction --repository test
13+
overwrite-repository: true
14+
repository-url: https://test.pypi.org/legacy/
15+
token: ${{ secrets.TEST_PYPI_TOKEN }}
2216
build-and-publish:
2317
needs: build-and-publish-test
24-
name: Build and publish
2518
runs-on: ubuntu-latest
2619
steps:
27-
- uses: actions/checkout@v2
28-
- uses: actions/setup-python@v2
20+
- uses: snok/.github/workflows/publish@main
2921
with:
30-
python-version: 3.9
31-
- uses: snok/install-poetry@v1.1.1
32-
- name: Publish to pypi
33-
run: |
34-
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
35-
poetry publish --build --no-interaction
22+
token: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)