Debian Codegraph @

.github/workflows/CD.yaml

raw symbols SCIP
1 # SPDX-FileCopyrightText: 2024 Shun Sakai
2 #
3 # SPDX-License-Identifier: Apache-2.0 OR MIT
4
5 name: CD
6
7 on:
8 push:
9 tags:
10 - "v[0-9]+.[0-9]+.[0-9]+"
11 workflow_dispatch:
12
13 permissions:
14 contents: write
15
16 jobs:
17 release:
18 name: Release
19 runs-on: ubuntu-24.04
20 steps:
21 - name: Checkout code
22 uses: actions/checkout@v6
23 - name: Setup Go environment
24 uses: actions/setup-go@v6
25 with:
26 go-version: "stable"
27 - name: Setup Ruby
28 uses: ruby/setup-ruby@v1
29 with:
30 ruby-version: 4.0
31 - name: Install Asciidoctor
32 run: |
33 gem install asciidoctor
34 asciidoctor -V
35 - name: Check `.goreleaser.yaml`
36 uses: goreleaser/[email protected]
37 with:
38 distribution: "goreleaser"
39 version: "~> v2"
40 args: check
41 - name: Check GoReleaser
42 uses: goreleaser/[email protected]
43 if: ${{ !startsWith(github.ref, 'refs/tags/') }}
44 with:
45 distribution: "goreleaser"
46 version: "~> v2"
47 args: release --clean --snapshot
48 - name: Run GoReleaser
49 uses: goreleaser/[email protected]
50 if: startsWith(github.ref, 'refs/tags/')
51 with:
52 distribution: "goreleaser"
53 version: "~> v2"
54 args: release --clean
55 env:
56 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}