Skip to content

Commit

Permalink
Cleanup and attest-build-provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
harmless-tech committed May 7, 2024
1 parent 49884f3 commit 7cf9387
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ name: Rust Build and Test
on:
push:
branches: [ main ]
paths: [ .github/workflows/build.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml, Cross.toml ]
paths: [ .github/workflows/build.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml ]
pull_request:
branches: [ main ]
paths: [ .github/workflows/build.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml, Cross.toml ]
paths: [ .github/workflows/build.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml ]
workflow_dispatch:

env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ name: Rust Checks
on:
push:
branches: [ main ]
paths: [ .github/workflows/checks.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml, Cross.toml, deny.toml, rustfmt.toml ]
paths: [ .github/workflows/checks.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml, deny.toml, rustfmt.toml ]
pull_request:
branches: [ main ]
paths: [ .github/workflows/checks.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml, Cross.toml, deny.toml, rustfmt.toml ]
paths: [ .github/workflows/checks.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml, deny.toml, rustfmt.toml ]
workflow_dispatch:

env:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
- "v**"
workflow_dispatch:

permissions:
id-token: write
attestations: write
contents: write

env:
bin-name: qstract
feature-set: ''
Expand Down Expand Up @@ -375,6 +380,9 @@ jobs:
run: cp ./target/${{ matrix.target }}/zmall/${{ env.bin-name }} ./${{ env.bin-name }}-${{ matrix.target }}
- name: Chmod
run: chmod +x ./${{ env.bin-name }}-${{ matrix.target }}
- uses: actions/attest-build-provenance@v1
with:
subject-path: ./${{ env.bin-name }}-${{ matrix.target }}
- name: Hash
run: echo "$(coreutils sha256sum ./${{ env.bin-name }}-${{ matrix.target }})" > ${{ matrix.target }}.sha256
- name: Artifact
Expand Down Expand Up @@ -420,6 +428,9 @@ jobs:
run: cp ./target/${{ matrix.target }}/zmall/${{ env.bin-name }} ./${{ env.bin-name }}-${{ matrix.target }}
- name: Chmod
run: chmod +x ./${{ env.bin-name }}-${{ matrix.target }}
- uses: actions/attest-build-provenance@v1
with:
subject-path: ./${{ env.bin-name }}-${{ matrix.target }}
- name: Hash
run: echo "$(coreutils sha256sum ./${{ env.bin-name }}-${{ matrix.target }})" > ${{ matrix.target }}.sha256
- name: Artifact
Expand Down Expand Up @@ -459,6 +470,9 @@ jobs:
run: cargo +nightly auditable build --verbose --workspace --profile=zmall --locked --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Rename
run: cp ./target/${{ matrix.target }}/zmall/${{ env.bin-name }}.exe ./${{ env.bin-name }}-${{ matrix.target }}.exe
- uses: actions/attest-build-provenance@v1
with:
subject-path: ./${{ env.bin-name }}-${{ matrix.target }}.exe
- name: Hash
run: echo "$(coreutils sha256sum ./${{ env.bin-name }}-${{ matrix.target }}.exe)" > ${{ matrix.target }}.sha256
- name: Artifact
Expand Down
58 changes: 29 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qstract"
version = "0.2.2"
version = "0.2.3"
edition = "2021"
authors = ["harmless-tech"]
description = "A very basic tar/zip extraction program"
Expand All @@ -20,8 +20,8 @@ include = [
]

[dependencies]
anyhow = "1.0.82"
flate2 = "1.0.28"
anyhow = "1.0.83"
flate2 = "1.0.30" # TODO: zlib?
hex = "0.4.3"
pico-args = { version = "0.5.0", features = ["eq-separator"] }
rc-zip-sync = { version = "4.1.0", default-features = false, features = ["deflate", "deflate64"] }
Expand Down
59 changes: 0 additions & 59 deletions Cross.toml

This file was deleted.

0 comments on commit 7cf9387

Please sign in to comment.