-
Notifications
You must be signed in to change notification settings - Fork 5
29 lines (26 loc) · 1015 Bytes
/
release.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
# Per:
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
name: Publish
on:
release:
types: [published, released]
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: Build and publish to pypi
if: "github.event.release.prerelease"
uses: JRubics/[email protected]
with:
repository_name: "testpypi"
repository_url: "https://test.pypi.org/legacy/"
python_version: "3.9.5"
pypi_token: ${{ secrets.DISPUTABLE_VALUES_MONITOR_TEST_PYPI_API_TOKEN }}
- name: Build and publish to pypi
if: "!github.event.release.prerelease"
uses: JRubics/[email protected]
with:
python_version: "3.9.5"
pypi_token: ${{ secrets.DISPUTABLE_VALUES_MONITOR_PYPI_API_TOKEN }}