-
-
Notifications
You must be signed in to change notification settings - Fork 16
78 lines (68 loc) · 2.59 KB
/
Copy pathcd.yml
File metadata and controls
78 lines (68 loc) · 2.59 KB
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
77
78
name: cd
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
issues: write
pull-requests: write
jobs:
# ====================================================
# Versioning and Release
# ====================================================
semantic-release:
name: semantic-release
uses: wislertt/zerv/.github/workflows/shared-semantic-release.yml@bab11cb3fe35f4f9b4fd746f7ea159ba00e0109d # v0.8.15
with:
allowed_workflow_dispatch_branches: '["main"]'
fail_on_invalid_workflow_dispatch_ref: true
zerv-versioning:
needs: semantic-release
if: needs.semantic-release.outputs.is_valid_semantic_release == 'true'
uses: wislertt/zerv/.github/workflows/shared-zerv-versioning.yml@bab11cb3fe35f4f9b4fd746f7ea159ba00e0109d # v0.8.15
create-version-prefix-tags:
needs: zerv-versioning
uses: wislertt/zerv/.github/workflows/shared-create-tags.yml@bab11cb3fe35f4f9b4fd746f7ea159ba00e0109d # v0.8.15
with:
tags: >-
[
"${{ fromJson(needs.zerv-versioning.outputs.versions).v_major }}",
"${{ fromJson(needs.zerv-versioning.outputs.versions).v_major_minor }}"
]
# ====================================================
# Test and Lint
# ====================================================
test:
uses: ./.github/workflows/test.yml
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-reproducibility:
name: test-reproducibility
uses: ./.github/workflows/test-reproducibility.yml
pre-commit:
name: pre-commit
uses: ./.github/workflows/pre-commit.yml
# ====================================================
# Deployment
# ====================================================
publish-pypi:
needs: zerv-versioning
uses: ./.github/workflows/publish.yml
with:
version: ${{ fromJson(needs.zerv-versioning.outputs.versions).pep440 }}
registry: "pypi"
python_version: "3.14"
secrets:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
publish-test-pypi:
needs: zerv-versioning
uses: ./.github/workflows/publish.yml
with:
version: ${{ fromJson(needs.zerv-versioning.outputs.versions).pep440 }}
registry: "test-pypi"
python_version: "3.14"
secrets:
PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}