aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/release.yml
blob: 335bec2d0384ecc2a695dd852871403b06c38266 (plain) (blame)
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
name: Build release binaries

on:
  push:
    tags:
      - "v*"

concurrency:
  group: release-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build-release:
    runs-on: "ubuntu-latest"
    steps:
      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: 1.22.5

      - name: Check out code
        uses: actions/checkout@v4

      - name: Build
        run: make

      - name: Setup minimal git config
        run: |
          git config --global user.email "action@github.com"
          git config --global user.name "GitHub Action"

      - name: Test
        run: make test

      - name: Build binaries
        run: make releases

      - uses: "marvinpinto/action-automatic-releases@latest"
        with:
          repo_token: "${{ secrets.GITHUB_TOKEN }}"
          draft: true
          prerelease: false
          files: dist/*