Skip to content

create-release

create-release #62

name: Create release
on:
repository_dispatch:
types: [ create-release ]
permissions:
id-token: write
contents: write
packages: write
env:
GO_VERSION: '1.22'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout the repository at the given SHA from the artifact
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: true
fetch-depth: 0
ref: ${{ github.event.client_payload.tag }}
- name: Goreleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: latest
args: release --clean --timeout 60m --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.event.client_payload.tag }}