Skip to content

DOMFortify 0.5.0

DOMFortify 0.5.0 #5

Workflow file for this run

name: Sign Release
on:
release:
types: [published]
permissions:
contents: read
jobs:
sign:
runs-on: ubuntu-latest
permissions:
contents: write # to attach .sigstore bundles to the release
id-token: write # OIDC for keyless signing
steps:
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.release.tag_name }}
persist-credentials: false
# Build the tagged release's dist so we sign exactly what was released
# (and the same bytes slsa-provenance attests), not stale committed dist
# from whatever branch the workflow happened to check out.
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
- run: npm ci --ignore-scripts
- run: npm run build
- uses: sigstore/gh-action-sigstore-python@5b79a39c381910c090341a2c9b0bf022c8b387e1 # v3.0.1
with:
inputs: dist/fortify.min.js dist/fortify.js
# Re-uploads signed artefacts to the release that triggered this run.
# Without this flag, .sigstore bundles are generated but dropped at
# job end - the release page gets nothing.
release-signing-artifacts: true