-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (99 loc) · 2.78 KB
/
publish_tp53.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: publish tp53
on:
push:
tags: '\d+.\d+.\d+'
env:
POETRY_VERSION: 1.8.2
jobs:
on-main-branch-check:
runs-on: ubuntu-latest
outputs:
on_main: ${{ steps.contains_tag.outputs.retval }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: rickstaa/action-contains-tag@v1
id: contains_tag
with:
reference: "main"
tag: "${{ github.ref_name }}"
python-tests:
name: python-tests
needs: on-main-branch-check
if: ${{ needs.on-main-branch-check.outputs.on_main == 'true' }}
uses: "./.github/workflows/tests_python.yml"
scala-tests:
name: scala-tests
needs: on-main-branch-check
if: ${{ needs.on-main-branch-check.outputs.on_main == 'true' }}
uses: "./.github/workflows/tests_scala.yml"
build-wheels:
name: build wheels
needs: python-tests
uses: "./.github/workflows/build_wheels.yml"
build-sdist:
name: build source distribution
needs: python-tests
uses: "./.github/workflows/build_sdist.yml"
publish-to-pypi:
runs-on: ubuntu-latest
needs: [build-wheels, build-sdist]
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
path: packages
pattern: 'tp53-*'
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/
skip-existing: true
verbose: true
build-seshat-exe:
name: build seshat executable
needs: scala-tests
uses: "./.github/workflows/build_seshat_exe.yml"
make-changelog:
runs-on: ubuntu-latest
needs: publish-to-pypi
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout the Repository at the Tagged Commit
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- name: Generate a Changelog
uses: orhun/git-cliff-action@v3
id: git-cliff
with:
config: ./python/pyproject.toml
args: --latest --verbose
env:
GITHUB_REPO: ${{ github.repository }}
make-github-release:
runs-on: ubuntu-latest
environment: github
permissions:
contents: write
pull-requests: read
needs: [build-seshat-exe, make-changelog]
steps:
- uses: actions/download-artifact@v4
with:
pattern: "seshat"
merge-multiple: true
- name: Create Draft Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
body: ${{ needs.make-changelog.outputs.release_body }}
draft: false
prerelease: false
files: "seshat"