Skip to content

Commit 1027b1d

Browse files
authored
Merge pull request #700 from web-token/ci/release-single-job-4.3.x
ci: run the whole release sequence in a single job
2 parents e1494bf + 6a26d6d commit 1027b1d

1 file changed

Lines changed: 6 additions & 48 deletions

File tree

.github/workflows/release-on-milestone-closed.yml

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: "Automatic Releases"
22

3+
# The five commands must stay steps of a single job: "release" runs
4+
# `git checkout <release branch>`, which is what makes that branch available
5+
# locally, and the following commands require it. Splitting them into separate
6+
# jobs gives each one a fresh checkout of the default branch, so every release
7+
# made from an older branch fails with "not a valid object name".
8+
39
on:
410
milestone:
511
types:
@@ -27,18 +33,6 @@ jobs:
2733
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
2834
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
2935

30-
merge-up:
31-
name: "Create Merge-Up Pull Request"
32-
runs-on: ubuntu-latest
33-
if: ${{ always() }}
34-
needs: "release"
35-
36-
steps:
37-
- name: "Checkout"
38-
uses: "actions/checkout@v4"
39-
with:
40-
fetch-depth: 0
41-
4236
- name: "Create Merge-Up Pull Request"
4337
uses: "laminas/automatic-releases@1.25.0"
4438
with:
@@ -50,18 +44,6 @@ jobs:
5044
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
5145
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
5246

53-
switch:
54-
name: "Create and/or Switch to new Release Branch"
55-
runs-on: ubuntu-latest
56-
if: ${{ always() }}
57-
needs: "merge-up"
58-
59-
steps:
60-
- name: "Checkout"
61-
uses: "actions/checkout@v4"
62-
with:
63-
fetch-depth: 0
64-
6547
- name: "Create and/or Switch to new Release Branch"
6648
uses: "laminas/automatic-releases@1.25.0"
6749
with:
@@ -73,18 +55,6 @@ jobs:
7355
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
7456
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
7557

76-
bump:
77-
name: "Bump Changelog Version On Originating Release Branch"
78-
runs-on: ubuntu-latest
79-
if: ${{ always() }}
80-
needs: "switch"
81-
82-
steps:
83-
- name: "Checkout"
84-
uses: "actions/checkout@v4"
85-
with:
86-
fetch-depth: 0
87-
8858
- name: "Bump Changelog Version On Originating Release Branch"
8959
uses: "laminas/automatic-releases@1.25.0"
9060
with:
@@ -96,18 +66,6 @@ jobs:
9666
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
9767
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
9868

99-
milestones:
100-
name: "Create new milestones"
101-
runs-on: ubuntu-latest
102-
if: ${{ always() }}
103-
needs: "bump"
104-
105-
steps:
106-
- name: "Checkout"
107-
uses: "actions/checkout@v4"
108-
with:
109-
fetch-depth: 0
110-
11169
- name: "Create new milestones"
11270
uses: "laminas/automatic-releases@1.25.0"
11371
with:

0 commit comments

Comments
 (0)