Create nest.yml #2
This file contains hidden or 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: Go Server | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| - name: Build Linux server binary | |
| run: | | |
| go build -o tchat-server-linux ./server/main.go | |
| - name: Build Windows server binary | |
| run: | | |
| GOOS=windows GOARCH=amd64 go build -o tchat-server.exe ./server/main.go | |
| - name: Upload Linux server binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tchat-server-linux | |
| path: tchat-server-linux | |
| - name: Upload Windows server binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tchat-server-windows | |
| path: tchat-server.exe |