Repository navigation
62 lines (51 loc) · 1.66 KB
/
Copy pathrelease.yml
File metadata and controls
62 lines (51 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# yamllint disable rule:comments rule:line-length
---
name: Release
on:
push:
tags:
- "*"
permissions:
contents: write
env:
CGO_ENABLED: 0
DOCKER_CLI_EXPERIMENTAL: "enabled"
GO_VERSION: "1.27.1"
jobs:
code-checks:
uses: ./.github/workflows/codeChecks.yml
goreleaser:
name: GoReleaser release
runs-on: ubuntu-latest
needs: [code-checks]
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
fetch-depth: 0
- name: Install Nix
uses: cachix/install-nix-action@ab739621df7a23f52766f9ccc97f38da6b7af14f # v31.10.5
with:
github_access_token: ${{ secrets.GH_GORELEASER_TOKEN }}
- name: Install Syft
uses: anchore/sbom-action/download-syft@e22c389904149dbc22b58101806040fa8d37a610 # v0.24.0
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Login to GitHub Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_GORELEASER_TOKEN }}
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
version: "~> 2"
args: release --clean
workdir: .
env:
GITHUB_TOKEN: ${{ secrets.GH_GORELEASER_TOKEN }}