diff options
| author | Bobby <[email protected]> | 2025-09-24 21:23:42 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-09-24 21:23:42 +0530 |
| commit | 825ec49266a33943d0affda0b1d4a5cc25c76510 (patch) | |
| tree | bf8160facdad1d72fcd6fbc055afc2cdbd1c88a0 /.github | |
| parent | c9e0fe763bf5521003719b3f174c473a978f523e (diff) | |
| download | thunderbird-ai-compose-server-825ec49266a33943d0affda0b1d4a5cc25c76510.tar.xz thunderbird-ai-compose-server-825ec49266a33943d0affda0b1d4a5cc25c76510.zip | |
added build and release extensions
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 36 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 64 |
2 files changed, 100 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8605f4e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + 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: Verify dependencies + run: go mod verify + + - name: Build + run: go build -v ./...
\ No newline at end of file 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 |
