-
Notifications
You must be signed in to change notification settings - Fork 9
68 lines (65 loc) · 1.99 KB
/
build.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build
on:
release:
types: [published]
jobs:
build:
name: 🔨 Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 🏗 Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: 🏗 Install build dependencies
run: |
python -m pip install wheel build --user
- name: 🔨 Build a binary wheel and a source tarball
run: |
python -m build --wheel
- name: ⬆ Upload build result
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
- name: ➕ Upload wheel to GH release page
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'release' && github.repository == 'Pioreactor/pioreactor'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.whl
tag: ${{ github.ref }}
overwrite: true
file_glob: true
publish-on-pypi:
name: 📦 Publish tagged releases to PyPI
runs-on: ubuntu-latest
needs: build
steps:
- name: ⬇ Download build result
uses: actions/download-artifact@v1
with:
name: dist
path: dist
- name: 📦 Publish to index
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PIOREACTOR_PYPI_API_TOKEN }}
notify-custopizer-build:
name: 📧 Notify Pioreactor/CustoPizer
runs-on: ubuntu-latest
needs: build
steps:
- name: 👀 Determine version
run: |
echo "PIOREACTOR_VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV
- name: 🚀 Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPODISPATCH_TOKEN }}
repository: Pioreactor/CustoPizer
event-type: pioreactor_release
client-payload: '{"version": "${{ env.PIOREACTOR_VERSION }}"}'