-
Notifications
You must be signed in to change notification settings - Fork 9
35 lines (31 loc) · 1.13 KB
/
publish.yaml
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
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to release. Must match the version in the version file!'
required: true
destination:
description: 'Release destination, "testing" for test.pypi.org, "release" for pypi.org.'
required: true
default: 'testing'
jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: Start the CI workflow for publishing to testing
if: ${{ github.event.inputs.destination == 'testing' }}
uses: benc-uk/workflow-dispatch@v1
with:
workflow: CI
token: ${{ secrets.PERSONAL_TOKEN }}
ref: ${{ github.event.inputs.tag }}
inputs: '{ "guard": "do-release", "repository_url": "https://test.pypi.org/legacy/" }'
- name: Start the CI workflow for publishing to Pypi
if: ${{ github.event.inputs.destination == 'release' }}
uses: benc-uk/workflow-dispatch@v1
with:
workflow: CI
token: ${{ secrets.PERSONAL_TOKEN }}
ref: ${{ github.event.inputs.tag }}
inputs: '{ "guard": "do-release", "repository_url": "https://upload.pypi.org/legacy/" }'