Repository navigation
feat: add readme #1
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
| name: Release Build | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build for Windows, Linux, and macOS | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| goos: [linux, windows, darwin] | |
| goarch: [amd64] | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: 0 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Show Go version | |
| run: go version | |
| - name: Build | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| EXT="" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi | |
| BIN_NAME="tibia-sprites-exporter-${{ matrix.goos }}-${{ matrix.goarch }}$EXT" | |
| echo "Building $BIN_NAME" | |
| go build -trimpath -ldflags "-s -w" -o "dist/$BIN_NAME" ./src | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tibia-sprites-exporter-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: dist/* | |
| if-no-files-found: error |