-
-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (64 loc) · 1.89 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Run tests and release
on:
push:
tags:
- "*"
workflow_dispatch:
workflow_call:
env:
PROJECT_FOLDER: "pirogue"
PYTHON_VERSION_RELEASE: "3.9"
PIROGUE_VERSION: ${{ github.ref_name }}
jobs:
tests:
name: "Tests"
uses: ./.github/workflows/test.yml
secrets: inherit
build-python-wheel:
name: "🐍 Python Wheel"
uses: ./.github/workflows/wheel.yml
secrets: inherit
release-gh:
name: "Release on tag 🚀"
runs-on: ubuntu-latest
needs: [build-python-wheel, tests]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Retrieve artifact from Python build
uses: actions/download-artifact@v4
with:
name: python_wheel
path: dist/
- name: Create/update release on GitHub
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
artifacts: "builds**/*"
generateReleaseNotes: true
omitNameDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
release-pypi:
name: "🐍 Release on PyPI"
runs-on: ubuntu-latest
needs: [build-python-wheel, tests]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Retrieve artifact from Python build
uses: actions/download-artifact@v4
with:
name: python_wheel
path: dist/
# -- FROM HERE, A TAG IS REQUIRED ---
- name: Deploy to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create/update release on GitHub
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
artifacts: "dist/*.tar.gz"
generateReleaseNotes: true
omitNameDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}