Skip to content

refactor(seedPeer): remove Enable flag and simplify checks (#4636) #521

refactor(seedPeer): remove Enable flag and simplify checks (#4636)

refactor(seedPeer): remove Enable flag and simplify checks (#4636) #521

Workflow file for this run

name: Release
on:
push:
tags:
- v*
permissions:
contents: read
jobs:
goreleaser:
permissions:
contents: write
runs-on: oracle-vm-24cpu-96gb-x86-64
timeout-minutes: 60
outputs:
hashes: ${{ steps.hash.outputs.hashes }}
tag_name: ${{ steps.tag.outputs.tag_name }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
submodules: recursive
- name: Setup Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5
with:
go-version-file: go.mod
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29
id: run-goreleaser
with:
version: latest
distribution: goreleaser
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate subject
id: hash
env:
ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}"
run: |
set -euo pipefail
hashes=$(echo $ARTIFACTS | jq --raw-output '.[] | {name, "digest": (.extra.Digest // .extra.Checksum)} | select(.digest) | {digest} + {name} | join(" ") | sub("^sha256:";"")' | base64 -w0)
if test "$hashes" = ""; then # goreleaser < v1.13.0
checksum_file=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Checksum") | .path')
hashes=$(cat $checksum_file | base64 -w0)
fi
echo "hashes=$hashes" >> $GITHUB_OUTPUT
- name: Set tag output
id: tag
run: echo "tag_name=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT"
provenance:
needs: [goreleaser]
permissions:
id-token: write
contents: write
actions: read
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0

Check failure on line 65 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

error parsing called workflow ".github/workflows/release.yml" -> "slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@01570a1f39cb168c169c802c3bceb9e93fb10974" : failed to fetch workflow: workflow was not found.
with:
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
upload-provenance:
needs: [goreleaser, provenance]
permissions:
contents: write
runs-on: oracle-vm-24cpu-96gb-x86-64
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
submodules: recursive
- name: Download SLSA provenance artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: multiple.intoto.jsonl
path: artifacts
- name: Upload SLSA Provenance Attestation to Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ needs.goreleaser.outputs.tag_name }}
run: |
set -euxo pipefail
ARTIFACT_PATH="artifacts/multiple.intoto.jsonl"
gh release upload "$TAG_NAME" "$ARTIFACT_PATH" --clobber