|
1 | 1 | name: "Automatic Releases" |
2 | 2 |
|
| 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 | + |
3 | 9 | on: |
4 | 10 | milestone: |
5 | 11 | types: |
|
27 | 33 | "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} |
28 | 34 | "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} |
29 | 35 |
|
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 | | - |
42 | 36 | - name: "Create Merge-Up Pull Request" |
43 | 37 | uses: "laminas/automatic-releases@1.25.0" |
44 | 38 | with: |
|
50 | 44 | "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} |
51 | 45 | "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} |
52 | 46 |
|
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 | | - |
65 | 47 | - name: "Create and/or Switch to new Release Branch" |
66 | 48 | uses: "laminas/automatic-releases@1.25.0" |
67 | 49 | with: |
|
73 | 55 | "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} |
74 | 56 | "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} |
75 | 57 |
|
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 | | - |
88 | 58 | - name: "Bump Changelog Version On Originating Release Branch" |
89 | 59 | uses: "laminas/automatic-releases@1.25.0" |
90 | 60 | with: |
|
96 | 66 | "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }} |
97 | 67 | "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }} |
98 | 68 |
|
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 | | - |
111 | 69 | - name: "Create new milestones" |
112 | 70 | uses: "laminas/automatic-releases@1.25.0" |
113 | 71 | with: |
|
0 commit comments