mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-03-12 00:59:53 +00:00
* ci: add permissions: {} to CI workflow with job-level contents: read
* ci: enforce least-privilege permissions in security workflow
* ci: enforce least-privilege permissions in commitlint workflow
* ci: enforce least-privilege permissions in pr-lint workflow and update actions
* ci: enforce least-privilege permissions in stale workflow and update actions
* ci: enforce least-privilege permissions in sync-labels workflow and update actions
* ci: enforce least-privilege permissions in release workflow and update actions
* chore(actions): update ivuorinen/actions/codeql-analysis (v2026.03.06 → v2026.03.09)
* chore(deps): update testdata composite action dependencies
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
---
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
|
|
with:
|
|
cache: true
|
|
|
|
- name: Set up Node.js (for cosign)
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: "24"
|
|
|
|
- name: Install cosign
|
|
uses: sigstore/cosign-installer@ba7bc0a3fef59531c69a25acd34668d6d3fe6f22 # v4.1.0
|
|
with:
|
|
cosign-release: "v2.4.0"
|
|
|
|
- name: Install syft
|
|
uses: anchore/sbom-action/download-syft@57aae528053a48a3f6235f2d9461b05fbcb7366d # v0.23.1
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
|
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
|