upgraded go in dockerfile #19
Workflow file for this run
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
| # This workflow will build a golang project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Build Gochat v1 | |
| on: | |
| push: | |
| tags: | |
| - "v1.*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| windows: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.25.0' | |
| - name: Install CGO | |
| run: sudo apt-get install gcc-mingw-w64 | |
| - name: Build all | |
| run: make all OS=windows ARCH=amd64 -j$(nproc) | |
| - name: Publish server | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gochatd_windows-amd64 | |
| path: build/gochatd.exe | |
| - name: Publish client | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gochat_windows-amd64 | |
| path: build/gochat.exe | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.25.0' | |
| - name: Build all | |
| run: make all OS=linux ARCH=amd64 -j$(nproc) | |
| - name: Publish server | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gochatd_linux-amd64 | |
| path: build/gochatd | |
| - name: Publish client | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gochat_linux-amd64 | |
| path: build/gochat | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [windows, linux] | |
| steps: | |
| - name: Prepare repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare folder and script | |
| run: mkdir artifacts && mv .github/workflows/create_release.sh create.sh && chmod +x create.sh | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create release file | |
| run: ./create.sh | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.ref_type == 'tag' | |
| with: | |
| body_path: RELEASE.txt | |
| preserve_order: true | |
| make_latest: true | |
| files: | | |
| gochat_windows-amd64.tar.gz | |
| gochat_linux-amd64.tar.gz | |
| gochatd_windows-amd64.tar.gz | |
| gochatd_linux-amd64.tar.gz |