Debian Codegraph @

.github/workflows/release.yaml

raw
1 name: NKeys Release
2
3 on:
4 # We use goreleaser in release mode, so if we do a workflow_dispatch rule here then we should prompt for a tag to check out.
5 push:
6 tags:
7 - 'v[0-9]*'
8
9 permissions:
10 # Control the GITHUB_TOKEN permissions; GitHub's docs on which permission scopes control what are a little lacking.
11 # By having this block, all permissions not listed here are set to none.
12 # <https://goreleaser.com/ci/actions/> documents which scopes are needed for it.
13 #
14 # Uploading archives as release artifacts is bundled into the contents: permission key.
15 # The packages: permission is for pushing docker images to github (ghcr.io) instead.
16 contents: write
17
18 jobs:
19 goreleaser:
20 runs-on: ubuntu-latest
21 steps:
22
23 - name: Checkout
24 uses: actions/checkout@v4
25 with:
26 # NB: the `fetch-depth: 0` setting is documented by goreleaser
27 # as a requirement, for the changelog feature to work correctly.
28 fetch-depth: 0
29
30 # If we do docker image builds, multi-arch, then because goreleaser can't do image builds
31 # in the style of 'crane' or 'ko', and needs a local docker daemon, then at this point
32 # we'd set up QEMU and Buildx; in other projects, we have success using:
33 # docker/setup-qemu-action@v1
34 # docker/setup-buildx-action@v1
35
36 - name: Set up Go
37 uses: actions/setup-go@v6
38 with:
39 go-version-file: "go.mod"
40
41 - name: Run GoReleaser
42 id: goreleaser
43 uses: goreleaser/goreleaser-action@v6
44 with:
45 args: release --clean
46 env:
47 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48