aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
blob: cf2a4a39ff1b13f937f3e1100310bb724cb1c74b (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
53
54
55
56
57
58
59
name: Release

on:
  release:
    types: [created]

permissions:
  contents: write

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - goos: windows
            goarch: amd64
            name: windows-amd64
            ext: .exe
          - goos: darwin
            goarch: amd64
            name: macos-intel
            ext: ""
          - goos: darwin
            goarch: arm64
            name: macos-arm64
            ext: ""
          - goos: linux
            goarch: amd64
            name: linux-amd64
            ext: ""
          - goos: linux
            goarch: arm64
            name: linux-arm64
            ext: ""
    
    steps:
    - uses: actions/checkout@v4
    
    - name: Set up Go
      uses: actions/setup-go@v5
      with:
        go-version: '1.25.1'
    
    - name: Download dependencies
      run: go mod download
    
    - name: Build binary
      env:
        GOOS: ${{ matrix.goos }}
        GOARCH: ${{ matrix.goarch }}
        CGO_ENABLED: 0
      run: |
        go build -ldflags="-s -w" -o thunderbird-ai-compose-server-${{ matrix.name }}${{ matrix.ext }} .
    
    - name: Upload release assets
      uses: softprops/action-gh-release@v2
      with:
        files: thunderbird-ai-compose-server-${{ matrix.name }}${{ matrix.ext }}