aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorBobby <[email protected]>2025-09-24 21:23:42 +0530
committerBobby <[email protected]>2025-09-24 21:23:42 +0530
commit825ec49266a33943d0affda0b1d4a5cc25c76510 (patch)
treebf8160facdad1d72fcd6fbc055afc2cdbd1c88a0 /.github/workflows/release.yml
parentc9e0fe763bf5521003719b3f174c473a978f523e (diff)
downloadthunderbird-ai-compose-server-825ec49266a33943d0affda0b1d4a5cc25c76510.tar.xz
thunderbird-ai-compose-server-825ec49266a33943d0affda0b1d4a5cc25c76510.zip
added build and release extensions
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml64
1 files changed, 64 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..831c79e
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,64 @@
+name: Release
+
+on:
+ release:
+ types: [created]
+
+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: Cache Go modules
+ uses: actions/cache@v4
+ with:
+ path: ~/go/pkg/mod
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-go-
+
+ - 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 }} \ No newline at end of file