Skip to content

Commit

Permalink
Merge pull request #21 from Do-sth-sharp/master
Browse files Browse the repository at this point in the history
Add Artifacts Attestation
  • Loading branch information
LiuYunPlayer authored Jun 3, 2024
2 parents 55acb8c + 9715497 commit 71c5fb7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:

runs-on: windows-latest

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

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -51,6 +56,11 @@ jobs:
shell: pwsh
run: Move-Item -Path TuneLab\bin\Release\net8.0\${{ matrix.runtime }}\publish -Destination workspace

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: '"workspace/*.dll","workspace/*.exe"'

- name: Pack artifacts
shell: pwsh
run: Compress-Archive -Path workspace\* -DestinationPath ${env:ARCHIVE_NAME}'.zip'
Expand Down Expand Up @@ -79,6 +89,11 @@ jobs:

runs-on: macos-latest

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

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -108,6 +123,11 @@ jobs:
- name: Move artifacts
run: mv TuneLab/bin/Release/net8.0/${{ matrix.runtime }}/publish workspace

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: '"workspace/*.dll","workspace/ExtensionInstaller","workspace/TuneLab"'

- name: Pack artifacts
run: |
cd workspace
Expand All @@ -129,6 +149,11 @@ jobs:

runs-on: ubuntu-latest

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

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -158,6 +183,11 @@ jobs:
- name: Move artifacts
run: mv TuneLab/bin/Release/net8.0/${{ matrix.runtime }}/publish workspace

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: '"workspace/*.dll","workspace/ExtensionInstaller","workspace/TuneLab"'

- name: Pack artifacts
run: |
cd workspace
Expand Down

0 comments on commit 71c5fb7

Please sign in to comment.