diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5c7131b..73d4682 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,4 +15,3 @@ updates: open-pull-requests-limit: 10 cooldown: default-days: 7 - semver-major-days: 14 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c36a17..88ca39a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,9 @@ on: type: boolean default: true +permissions: + contents: read + concurrency: group: release-${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.sha }} cancel-in-progress: false @@ -146,6 +149,8 @@ jobs: timeout-minutes: 30 permissions: contents: write + attestations: write + id-token: write steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -211,6 +216,27 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} + - name: Collect attestation subjects + id: attestation_subjects + shell: bash + run: | + set -euo pipefail + mapfile -t subjects < <(find dist -maxdepth 1 -type f | sort) + if ((${#subjects[@]} == 0)); then + echo "::error::No release artifacts found to attest." + exit 1 + fi + { + echo "subjects<> "$GITHUB_OUTPUT" + + - name: Generate artifact attestation + uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4 + with: + subject-path: ${{ steps.attestation_subjects.outputs.subjects }} + skill-publish: needs: [prepare, release] if: >-