-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.77 KB
/
slsa-generator-nodejs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: SLSA Generator NodeJS
on:
workflow_dispatch:
push:
permissions:
contents: read
id-token: write
attestations: write
jobs:
build:
permissions:
id-token: write # For signing
contents: read # For repo checkout.
actions: read # For getting workflow run info.
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
run-scripts: "build"
rekor-log-public: true
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download tarball
uses: slsa-framework/slsa-github-generator/actions/nodejs/[email protected]
with:
name: ${{ needs.build.outputs.package-download-name }}
path: ${{ needs.build.outputs.package-name }}
sha256: ${{ needs.build.outputs.package-download-sha256 }}
- run: ls -Rla
- run: echo ${{ needs.build.outputs.provenance-download-name }}
- run: echo ${{ needs.build.outputs.provenance-name }}
- name: Download provenance
uses: slsa-framework/slsa-github-generator/actions/nodejs/[email protected]
with:
name: ${{ needs.build.outputs.provenance-download-name }}
path: attestations
sha256: ${{ needs.build.outputs.provenance-download-sha256 }}
- run: ls -Rla
# - name: Upload to npmjs.com
# env:
# TARBALL_PATH: "${{ needs.build.outputs.package-name }}"
# PROVENANCE_PATH: "./attestations/${{ needs.build.outputs.provenance-download-name }}/${{ needs.build.outputs.provenance-name }}"
# run: |
# npm config set //registry.npmjs.org/:_authToken "${{ secrets.NPM_TOKEN }}"
# npm publish "${TARBALL_PATH}" --access public --provenance-file="${PROVENANCE_PATH}"