-
Notifications
You must be signed in to change notification settings - Fork 160
50 lines (42 loc) · 1.28 KB
/
pypi-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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# A workflow to publish releases to PyPi and TestPyPi.
name: pypi-publish
on:
release:
types: [published]
workflow_dispatch:
inputs:
upload_to_test_pypi:
description: 'Upload to Test PyPi'
type: boolean
default: true
upload_to_pypi:
description: 'Upload to PyPi'
type: boolean
default: false
permissions: read-all
jobs:
pypi-publish:
name: Upload to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/gdm-concordia
permissions:
id-token: write
timeout-minutes: 90
steps:
- name: Checkout Concordia
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Build distribution
run: python setup.py sdist bdist_wheel
- name: Publish to TestPyPI
if: github.event_name == 'release' || inputs.upload_to_test_pypi
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
- name: Publish to PyPI
if: github.event_name == 'release' || inputs.upload_to_pypi
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
with:
verbose: true