Skip to content

Commit

Permalink
ci: try to add attest-build-provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
cawa-93 committed Nov 16, 2024
1 parent ba605c1 commit 164be01
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
compile-and-test:
needs:
- prepare
permissions:
contents: write
id-token: write
attestations: write
uses: ./.github/workflows/compile-and-test.yml
with:
renderer-template: ${{ inputs.renderer-template }}
Expand All @@ -57,8 +61,6 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: write
id-token: write
attestations: write
needs:
- prepare
- compile-and-test
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/compile-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ defaults:
run:
shell: 'bash'

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

env:
NODE_NO_WARNINGS: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
Expand Down Expand Up @@ -59,6 +64,10 @@ jobs:

- run: npm run test --if-present

- uses: actions/attest-build-provenance@v1
with:
subject-path: "dist/root*, dist/latest*.yml"

- name: Upload compiled app
uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on:

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

defaults:
run:
Expand All @@ -38,9 +36,7 @@ jobs:
pattern: "*-${{inputs.distribution-channel}}"
path: dist
merge-multiple: true
- uses: actions/attest-build-provenance@v1
with:
subject-path: "dist/root*, dist/latest*.yml"

- run: gh release create v${{inputs.app-version}} dist/root* dist/latest*.yml --repo ${{github.repository}}
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 164be01

Please sign in to comment.