ci: download dependencies #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.4 | |
- name: Change directory to server | |
run: cd server | |
- name: Download dependencies | |
run: go mod download | |
- name: Build binaries (Windows amd64) | |
run: GOOS=windows GOARCH=amd64 go build -o cmd/bugbuddy-windows-amd64.exe . | |
- name: Build binaries (Windows arm64) | |
run: GOOS=windows GOARCH=arm64 go build -o cmd/bugbuddy-windows-arm64.exe . | |
- name: Build binaries (Linux amd64) | |
run: GOOS=linux GOARCH=amd64 go build -o cmd/bugbuddy-linux-amd64 . | |
- name: Build binaries (Linux arm64) | |
run: GOOS=linux GOARCH=arm64 go build -o cmd/bugbuddy-linux-arm64 . | |
- name: Build binaries (macOS amd64) | |
run: GOOS=darwin GOARCH=amd64 go build -o cmd/bugbuddy-macos-amd64 . | |
- name: Build binaries (macOS arm64) | |
run: GOOS=darwin GOARCH=arm64 go build -o cmd/bugbuddy-macos-arm64 . | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: nightly | |
name: Nightly Build | |
body: Nightly build release | |
draft: false | |
prerelease: true | |
files: | | |
server/cmd/bugbuddy-windows-amd64.exe # Include Windows amd64 binary | |
server/cmd/bugbuddy-windows-arm64.exe # Include Windows arm64 binary | |
server/cmd/bugbuddy-linux-amd64 # Include Linux amd64 binary | |
server/cmd/bugbuddy-linux-arm64 # Include Linux arm64 binary | |
server/cmd/bugbuddy-macos-amd64 # Include macOS amd64 binary | |
server/cmd/bugbuddy-macos-arm64 # Include macOS arm64 binary |