-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·72 lines (65 loc) · 1.83 KB
/
python-pipeline.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
69
70
71
72
---
name: Pipeline
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "src/*"
- "pyproject.toml"
release:
types:
- published
jobs:
# This job is a workaround for global variables
# See https://github.com/actions/runner/issues/480
params:
uses: tyg3rr/Epi_Helper/.github/workflows/params.yaml@main
with:
name: epi_helper
# Optional
system_list: "ubuntu windows msys2 macos"
python-version: "3.11"
python-version_list: "3.9 3.10 3.11"
package:
uses: tyg3rr/Epi_Helper/.github/workflows/python-package.yaml@main
needs:
- params
with:
artifact: ${{ fromJson(needs.params.outputs.params).artifacts.package }}
# Optional
python-version: ${{ fromJson(needs.params.outputs.params).python-version }}
requirements: 'wheel'
publishOnTestPyPI:
uses: tyg3rr/Epi_Helper/.github/workflows/publish-pypi.yaml@main
needs:
- params
- package
permissions:
id-token: write
with:
artifact: ${{ fromJson(needs.params.outputs.params).artifacts.package }}
# Optional
python-version: ${{ fromJson(needs.params.outputs.params).python-version }}
requirements: 'wheel twine'
environment: 'test-pypi'
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
publishOnPyPI:
uses: tyg3rr/Epi_Helper/.github/workflows/publish-pypi.yaml@main
if: startsWith(github.ref, 'refs/tags')
needs:
- params
# - release
- package
permissions:
id-token: write
with:
artifact: ${{ fromJson(needs.params.outputs.params).artifacts.package }}
# Optional
python-version: ${{ fromJson(needs.params.outputs.params).python-version }}
requirements: 'wheel twine'
environment: 'release-pypi'
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}