Skip to content

Commit

Permalink
attestations
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Nov 9, 2024
1 parent 5cba402 commit 22226ab
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Build Release

permissions:
id-token: write
attestations: write

on:
release:
types: [published]
Expand Down Expand Up @@ -59,11 +63,6 @@ jobs:
args: --target i686-unknown-linux-gnu --release --features katmos
if: matrix.os == 'ubuntu-20.04'

- name: Write checksum to a file
shell: bash
run: |
sha256sum "target/${{ matrix.target_name }}/release/${{ matrix.artifact_name }}" | tee ${{ matrix.artifact_name }}.sha256
- name: Create bindings (Ubuntu)
uses: actions-rs/cargo@v1
with:
Expand All @@ -72,13 +71,22 @@ jobs:
args: --target i686-unknown-linux-gnu --release --features katmos --package auxmos --lib -- generate_binds --exact --show-output
if: matrix.os == 'ubuntu-20.04'

- name: Upload checksum files to release
uses: svenstaro/upload-release-action@v1-release
- name: Generate build provenance (Binaries)
uses: actions/attest-build-provenance@v1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.artifact_name }}.sha256
asset_name: ${{ matrix.artifact_name }}.sha256
tag: ${{ github.ref }}
subject-path: target/${{ matrix.target_name }}/release/${{ matrix.artifact_name }}

- name: Generate build provenance (Debug information)
uses: actions/attest-build-provenance@v1
with:
subject-path: target/${{ matrix.target_name }}/release/${{ matrix.debug_pdb_name }}
if: matrix.os == 'windows-latest'

- name: Generate build provenance (Bindings)
uses: actions/attest-build-provenance@v1
with:
subject-path: bindings.dm
if: matrix.os == 'ubuntu-20.04'

- name: Upload binary to release
uses: svenstaro/upload-release-action@v1-release
Expand All @@ -104,3 +112,4 @@ jobs:
file: bindings.dm
asset_name: bindings.dm
tag: ${{ github.ref }}
if: matrix.os == 'ubuntu-20.04'

0 comments on commit 22226ab

Please sign in to comment.