From b8a30eba3e693c0e25f8ba1e6ec96f3283e59812 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 12 May 2026 18:26:23 +0000 Subject: [PATCH] Add GitHub Actions workflow with artifact attestation for releases - Create build job that compiles main.js and styles.css - Add attest job using actions/attest-build-provenance for both assets - Create release job that publishes artifacts with their attestations - Enables users to cryptographically verify release asset provenance --- .github/workflows/release.yml | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ff11f45 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,82 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + main-js-path: ${{ steps.build.outputs.main-js-path }} + styles-css-path: ${{ steps.build.outputs.styles-css-path }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + - run: npm run build + + - id: build + run: | + echo "main-js-path=main.js" >> $GITHUB_OUTPUT + echo "styles-css-path=styles.css" >> $GITHUB_OUTPUT + + attest: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + - run: npm run build + + - name: Attest build provenance for main.js + uses: actions/attest-build-provenance@v1 + with: + subject-path: main.js + + - name: Attest build provenance for styles.css + uses: actions/attest-build-provenance@v1 + with: + subject-path: styles.css + + release: + needs: [build, attest] + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + - run: npm run build + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: | + main.js + styles.css + manifest.json