-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (49 loc) · 1.53 KB
/
deploy-pypi.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
51
52
53
54
55
56
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 The Foundry Visionmongers Ltd
name: Deploy PyPI
concurrency:
# Shared with `build-wheels`.
group: wheel-${{ github.ref }}
# Allow `build-wheels` to finish.
cancel-in-progress: false
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish_testpypi:
name: Publish distribution 📦 to TestPyPI
runs-on: ubuntu-22.04
steps:
- name: Download wheels from commit ${{ github.sha }}
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-wheels.yml
workflow_conclusion: success
commit: ${{ github.sha }}
name: openassetio-manager-bal-wheels
path: dist
- name: Upload to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_ACCESS_TOKEN }}
repository_url: https://test.pypi.org/legacy/
publish_pypi:
name: Publish distribution 📦 to PyPI
needs: publish_testpypi
runs-on: ubuntu-22.04
steps:
- name: Download wheels from commit ${{ github.sha }}
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-wheels.yml
workflow_conclusion: success
commit: ${{ github.sha }}
name: openassetio-manager-bal-wheels
path: dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_ACCESS_TOKEN }}