Skip to content

Commit ee2a9a3

Browse files
committed
ci: update release workflows
Signed-off-by: Charles Moore <[email protected]>
1 parent 3070830 commit ee2a9a3

File tree

3 files changed

+52
-13
lines changed

3 files changed

+52
-13
lines changed

.github/workflows/code_quality.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branch:
99
required: false
1010
type: string
11+
tag:
12+
required: false
13+
type: string
1114

1215
jobs:
1316
Test:
@@ -20,3 +23,4 @@ jobs:
2023
with:
2124
os: ${{ matrix.os }}
2225
python-version: ${{ matrix.python-version }}
26+
ref: ${{inputs.tag}}

.github/workflows/release_bump.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,8 @@ concurrency:
1717
group: release
1818

1919
jobs:
20-
UnitTests:
21-
name: Unit Tests
22-
uses: ./.github/workflows/code_quality.yml
23-
with:
24-
branch: mainline
25-
2620
Bump:
2721
name: Version Bump
28-
needs: UnitTests
2922
uses: OpenJobDescription/.github/.github/workflows/reusable_bump.yml@mainline
3023
secrets: inherit
3124
with:

.github/workflows/release_publish.yml

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,68 @@
11
name: "Release: Publish"
2-
run-name: "Release: ${{ github.event.head_commit.message }}"
2+
run-name: "Release: ${{ github.event.head_commit.message || inputs.tag }}"
33

44
on:
55
push:
66
branches:
77
- mainline
88
paths:
99
- CHANGELOG.md
10+
workflow_dispatch:
11+
inputs:
12+
tag:
13+
required: true
14+
type: string
15+
description: Specify a tag to re-run a release.
1016

1117
concurrency:
1218
group: release
1319

20+
permissions:
21+
contents: read
22+
1423
jobs:
24+
TagRelease:
25+
uses: OpenJobDescription/.github/.github/workflows/reusable_tag_release.yml@mainline
26+
secrets: inherit
27+
with:
28+
tag: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || '' }}
29+
30+
UnitTests:
31+
name: Unit Tests
32+
needs: TagRelease
33+
uses: ./.github/workflows/code_quality.yml
34+
with:
35+
tag: ${{ needs.TagRelease.outputs.tag }}
36+
37+
PreRelease:
38+
needs: [TagRelease, UnitTests]
39+
uses: OpenJobDescription/.github/.github/workflows/reusable_prerelease.yml@mainline
40+
permissions:
41+
id-token: write
42+
contents: write
43+
secrets: inherit
44+
with:
45+
tag: ${{ needs.TagRelease.outputs.tag }}
46+
47+
Release:
48+
needs: [TagRelease, PreRelease]
49+
uses: OpenJobDescription/.github/.github/workflows/reusable_release.yml@mainline
50+
secrets: inherit
51+
permissions:
52+
id-token: write
53+
contents: write
54+
with:
55+
tag: ${{ needs.TagRelease.outputs.tag }}
56+
1557
Publish:
16-
name: Publish Release
58+
needs: [TagRelease, Release]
59+
uses: OpenJobDescription/.github/.github/workflows/reusable_publish_python.yml@mainline
1760
permissions:
1861
id-token: write
19-
contents: write
20-
uses: OpenJobDescription/.github/.github/workflows/reusable_publish.yml@mainline
2162
secrets: inherit
22-
# PyPI does not support reusable workflows yet
23-
# # See https://github.com/pypi/warehouse/issues/11096
63+
with:
64+
tag: ${{ needs.TagRelease.outputs.tag }}
65+
2466
PublishToPyPI:
2567
needs: Publish
2668
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)