5555          git push origin $ref_name --force 
5656
5757build :
58+     name : " Build Elixir" 
59+ 
5860    strategy :
5961      fail-fast : true 
6062      matrix :
6466          - otp : 27 
6567            otp_version : " 27.0" 
6668            build_docs : build_docs 
69+ 
6770    runs-on : ubuntu-22.04 
71+ 
6872    steps :
6973      - uses : actions/checkout@v4 
7074        with :
7781          otp : ${{ matrix.otp }} 
7882          build_docs : ${{ matrix.build_docs }} 
7983
80-       - name : " Attest docs provenance" 
81-         uses : actions/attest-build-provenance@v2 
82-         id : attest-docs-provenance 
83-         if : matrix.build_docs 
84-         with :
85-           subject-path : " Docs.zip" 
86- 
87-       - name : " Copy docs provenance" 
88-         if : matrix.build_docs 
89-         run : cp "$ATTESTATION" Docs.zip.sigstore 
90-         env :
91-           ATTESTATION : " ${{ steps.attest-docs-provenance.outputs.bundle-path }}" 
92- 
9384      - name : Create Docs Hashes 
9485        if : matrix.build_docs 
9586        run : | 
@@ -150,18 +141,6 @@ jobs:
150141          timestamp-rfc3161 : http://timestamp.acs.microsoft.com 
151142          timestamp-digest : SHA256 
152143
153-       - name : " Attest release provenance" 
154-         id : attest-provenance 
155-         uses : actions/attest-build-provenance@v2 
156-         with :
157-           subject-path : ${{ env.RELEASE_FILE }} 
158- 
159-       - name : " Copy release .zip provenance" 
160-         shell : bash 
161-         run : cp "$ATTESTATION" "${RELEASE_FILE}.sigstore" 
162-         env :
163-           ATTESTATION : " ${{ steps.attest-provenance.outputs.bundle-path }}" 
164- 
165144      - name : Create Release Hashes 
166145        if : matrix.flavor == 'windows' 
167146        shell : pwsh 
@@ -185,14 +164,92 @@ jobs:
185164          name : sign-${{ matrix.flavor }}-elixir-otp-${{ matrix.otp }} 
186165          path : ${{ env.RELEASE_FILE }}* 
187166
167+   sbom :
168+     name : Generate SBoM 
169+ 
170+     needs : [build, sign] 
171+ 
172+     runs-on : ubuntu-24.04 
173+ 
174+     steps :
175+       - name : Use HTTPS instead of SSH for Git cloning 
176+         id : git-config 
177+         shell : bash 
178+         run : 
git config --global url.https://github.com/.insteadOf ssh://[email protected] /  179+   
180+       - name : Checkout project 
181+         id : checkout 
182+         uses : actions/checkout@v4 
183+   
184+       - name : " Download Build Artifacts" 
185+         id : download-build-artifacts 
186+         uses : actions/download-artifact@v4 
187+         with :
188+           pattern : " {sign-*-elixir-otp-*,Docs}" 
189+           merge-multiple : true 
190+           path : /tmp/build-artifacts/ 
191+         
192+       - name : " Run OSS Review Toolkit" 
193+         id : ort 
194+         uses : ./.github/workflows/ort 
195+         with :
196+           build-artifacts : " /tmp/build-artifacts/*" 
197+           report-formats : " CycloneDx,SpdxDocument" 
198+           version : " ${{ github.ref_type	== 'tag' && github.ref_name || github.sha }}" 
199+ 
200+       - name : Attest Distribution Assets with SBoM 
201+         id : attest-sbom 
202+         uses : actions/attest-sbom@v2 
203+         with :
204+           subject-path : | 
205+             /tmp/build-artifacts/{elixir-otp-*.*,Docs.zip} 
206+             ${{ steps.ort.outputs.results-sbom-cyclonedx-xml-path }} 
207+             ${{ steps.ort.outputs.results-sbom-cyclonedx-json-path }} 
208+             ${{ steps.ort.outputs.results-sbom-spdx-yml-path }} 
209+             ${{ steps.ort.outputs.results-sbom-spdx-json-path }} 
210+ sbom-path : " ${{ steps.ort.outputs.results-sbom-spdx-json-path }}" 
211+ 
212+       - name : " Copy SBoM provenance" 
213+         id : sbom-provenance 
214+         shell : bash 
215+         run : | 
216+           mkdir attestations 
217+ 
218+           for FILE in /tmp/build-artifacts/{elixir-otp-*.*,Docs.zip}; do 
219+             cp "$ATTESTATION" "attestations/$(basename "$FILE").sigstore" 
220+           done 
221+ 
222+           cp "$ATTESTATION" "attestations/$(basename "${{ steps.ort.outputs.results-sbom-cyclonedx-xml-path }}").sigstore" 
223+           cp "$ATTESTATION" "attestations/$(basename "${{ steps.ort.outputs.results-sbom-cyclonedx-json-path }}").sigstore" 
224+           cp "$ATTESTATION" "attestations/$(basename "${{ steps.ort.outputs.results-sbom-spdx-yml-path }}").sigstore" 
225+           cp "$ATTESTATION" "attestations/$(basename "${{ steps.ort.outputs.results-sbom-spdx-json-path }}").sigstore" 
226+ env :
227+           ATTESTATION : " ${{ steps.attest-sbom.outputs.bundle-path }}" 
228+ 
229+       - name : " Assemble Release SBoM Artifacts" 
230+         uses : actions/upload-artifact@v4 
231+         with :
232+           name : " SBoM" 
233+           path : | 
234+             ${{ steps.ort.outputs.results-sbom-cyclonedx-xml-path }} 
235+             ${{ steps.ort.outputs.results-sbom-cyclonedx-json-path }} 
236+             ${{ steps.ort.outputs.results-sbom-spdx-yml-path }} 
237+             ${{ steps.ort.outputs.results-sbom-spdx-json-path }} 
238+ 
239+ name : " Assemble Distribution Attestations" 
240+         uses : actions/upload-artifact@v4 
241+         with :
242+           name : " Attestations" 
243+           path : " attestations/*.sigstore" 
244+ 
188245  upload-release :
189-     needs : [create_draft_release, build, sign] 
246+     needs : [create_draft_release, build, sign, sbom ] 
190247    runs-on : ubuntu-22.04 
191248
192249    steps :
193250      - uses : actions/download-artifact@v4 
194251        with :
195-           pattern : " {sign-*-elixir-otp-*,Docs}" 
252+           pattern : " {sign-*-elixir-otp-*,Docs,SBoM,Attestations }" 
196253          merge-multiple : true 
197254
198255      - name : Upload Pre-built 
@@ -218,7 +275,8 @@ jobs:
218275            elixir-otp-*.exe.sigstore \ 
219276            Docs.zip \ 
220277            Docs.zip.sha{1,256}sum \ 
221-             Docs.zip.sigstore 
278+             Docs.zip.sigstore \ 
279+             bom.* 
222280
223281upload-builds-hex-pm :
224282    needs : [build, sign] 
0 commit comments