-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (43 loc) · 1.02 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: release
# Releasing on push tags is less customizable compared to release upon request.
on:
# push:
# tags:
# - 'v[0-9]+.[0-9]+.[0-9]+'
release:
types: [published]
inputs:
release-pypi:
required: true
type: boolean
default: true
workflow_dispatch:
inputs:
release-pypi:
required: true
type: boolean
description: "if true a release is made on PyPI"
jobs:
test:
uses: ./.github/workflows/test.yml
build:
needs: test
uses: ./.github/workflows/build.yml
docs:
needs: test
uses: ./.github/workflows/docs.yml
secrets: inherit
release-pypi:
needs: [build]
runs-on: ubuntu-latest
if: github.event.inputs.release-pypi == 'true'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}