-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.56 KB
/
workflow.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
# Main workflow
name: CI
on:
push:
branches:
- '*'
- '!badges'
jobs:
# Stage 1: Validate Source
test:
name: Test the package
uses: ./.github/workflows/test.yml
mypy:
name: Static Type Check the package
uses: ./.github/workflows/mypy.yml
ruff:
name: Lint the package
uses: ./.github/workflows/ruff.yml
build:
name: Build the package
uses: ./.github/workflows/build.yml
# Stage 2: Release Packages and Build documentation
pypi:
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
uses: ./.github/workflows/pypi.yml
needs:
- test
- mypy
- ruff
- build
permissions:
id-token: write
github:
if: startsWith(github.ref, 'refs/tags/') # only publish to github on tag pushes
uses: ./.github/workflows/github.yml
needs:
- test
- mypy
- ruff
- build
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
docs:
if: # build docs if pushing to main or releasing
contains('refs/heads/main refs/tags', github.ref)
uses: ./.github/workflows/docs.yml
needs:
- test
- mypy
- ruff
- build
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases