summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: c4e295810d23b6da06efc399c5d685d3e83c8150 (plain)
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
name: Build

on:
  push:
    tags: [ 'v*' ]

jobs:
  build:
    name: Build on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]

    permissions:
      contents: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.25'

      - name: Build
        run: make qwe

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: qwe-${{ runner.os }}
          path: qwe

      - name: Rename for release
        run: |
          if [ "${{ runner.os }}" = "macOS" ]; then
            cp qwe qwe-macos
          else
            cp qwe qwe-linux
          fi

      - name: Release
        uses: softprops/action-gh-release@v2
        with:
          files: |
            qwe-macos
            qwe-linux
          generate_release_notes: true