Skip to content

Commit af4cb1d

Browse files
committed
Simplify release matrix
1 parent c1c2cf8 commit af4cb1d

File tree

1 file changed

+8
-22
lines changed

1 file changed

+8
-22
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,19 @@ jobs:
5959
fail-fast: true
6060
matrix:
6161
include:
62-
- otp: 25
63-
otp_version: "25.3"
64-
run_job: ${{ startsWith(github.ref_name, 'v1.18') }}
6562
- otp: 26
6663
otp_version: "26.0"
67-
run_job: true
6864
- otp: 27
6965
otp_version: "27.0"
7066
build_docs: build_docs
71-
run_job: true
7267
runs-on: ubuntu-22.04
7368
steps:
7469
- uses: actions/checkout@v4
75-
if: matrix.run_job
7670
with:
7771
fetch-depth: 50
7872

7973
- name: "Build Release"
8074
uses: ./.github/workflows/release_pre_built
81-
if: matrix.run_job
8275
with:
8376
otp_version: ${{ matrix.otp_version }}
8477
otp: ${{ matrix.otp }}
@@ -87,39 +80,37 @@ jobs:
8780
- name: "Attest docs provenance"
8881
uses: actions/attest-build-provenance@v2
8982
id: attest-docs-provenance
90-
if: matrix.run_job && matrix.build_docs
83+
if: matrix.build_docs
9184
with:
9285
subject-path: "Docs.zip"
9386

9487
- name: "Copy docs provenance"
95-
if: matrix.run_job && matrix.build_docs
88+
if: matrix.build_docs
9689
run: cp "$ATTESTATION" Docs.zip.sigstore
9790
env:
9891
ATTESTATION: "${{ steps.attest-docs-provenance.outputs.bundle-path }}"
9992

10093
- name: Create Docs Hashes
101-
if: matrix.run_job && matrix.build_docs
94+
if: matrix.build_docs
10295
run: |
10396
shasum -a 1 Docs.zip > Docs.zip.sha1sum
10497
shasum -a 256 Docs.zip > Docs.zip.sha256sum
10598
10699
- name: "Upload linux release artifacts"
107100
uses: actions/upload-artifact@v4
108-
if: matrix.run_job
109101
with:
110102
name: build-linux-elixir-otp-${{ matrix.otp }}
111103
path: elixir-otp-${{ matrix.otp }}.zip
112104

113105
- name: "Upload windows release artifacts"
114106
uses: actions/upload-artifact@v4
115-
if: matrix.run_job
116107
with:
117108
name: build-windows-elixir-otp-${{ matrix.otp }}
118109
path: elixir-otp-${{ matrix.otp }}.exe
119110

120111
- name: "Upload doc artifacts"
121112
uses: actions/upload-artifact@v4
122-
if: matrix.run_job && matrix.build_docs
113+
if: matrix.build_docs
123114
with:
124115
name: Docs
125116
path: Docs.zip*
@@ -129,7 +120,7 @@ jobs:
129120
strategy:
130121
fail-fast: true
131122
matrix:
132-
otp: [25, 26, 27]
123+
otp: [26, 27]
133124
flavor: [windows, linux]
134125

135126
env:
@@ -139,15 +130,13 @@ jobs:
139130

140131
steps:
141132
- name: "Download build"
142-
id: download
143-
continue-on-error: true
144133
uses: actions/download-artifact@v4
145134
with:
146135
name: build-${{ matrix.flavor }}-elixir-otp-${{ matrix.otp }}
147136

148137
- name: "Sign files with Trusted Signing"
149138
uses: azure/[email protected]
150-
if: github.repository == 'elixir-lang/elixir' && matrix.flavor == 'windows' && steps.download.outcome == 'success'
139+
if: github.repository == 'elixir-lang/elixir' && matrix.flavor == 'windows'
151140
with:
152141
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
153142
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -164,19 +153,17 @@ jobs:
164153
- name: "Attest release provenance"
165154
id: attest-provenance
166155
uses: actions/attest-build-provenance@v2
167-
if: steps.download.outcome == 'success'
168156
with:
169157
subject-path: ${{ env.RELEASE_FILE }}
170158

171159
- name: "Copy release .zip provenance"
172-
if: steps.download.outcome == 'success'
173160
shell: bash
174161
run: cp "$ATTESTATION" "${RELEASE_FILE}.sigstore"
175162
env:
176163
ATTESTATION: "${{ steps.attest-provenance.outputs.bundle-path }}"
177164

178165
- name: Create Release Hashes
179-
if: matrix.flavor == 'windows' && steps.download.outcome == 'success'
166+
if: matrix.flavor == 'windows'
180167
shell: pwsh
181168
run: |
182169
$sha1 = Get-FileHash "$env:RELEASE_FILE" -Algorithm SHA1
@@ -186,15 +173,14 @@ jobs:
186173
$sha256.Hash.ToLower() + " " + $env:RELEASE_FILE | Out-File "$env:RELEASE_FILE.sha256sum"
187174
188175
- name: Create Release Hashes
189-
if: matrix.flavor == 'linux' && steps.download.outcome == 'success'
176+
if: matrix.flavor == 'linux'
190177
shell: bash
191178
run: |
192179
shasum -a 1 "$RELEASE_FILE" > "${RELEASE_FILE}.sha1sum"
193180
shasum -a 256 "$RELEASE_FILE" > "${RELEASE_FILE}.sha256sum"
194181
195182
- name: "Upload linux release artifacts"
196183
uses: actions/upload-artifact@v4
197-
if: steps.download.outcome == 'success'
198184
with:
199185
name: sign-${{ matrix.flavor }}-elixir-otp-${{ matrix.otp }}
200186
path: ${{ env.RELEASE_FILE }}*

0 commit comments

Comments
 (0)