release.yml (1566B)
1 name: Release 2 3 on: 4 push: 5 tags: 6 - "v*" 7 workflow_dispatch: 8 9 jobs: 10 ci: 11 uses: ./.github/workflows/ci.yml 12 13 build: 14 needs: [ci] 15 runs-on: ubuntu-latest 16 defaults: 17 run: 18 working-directory: go 19 strategy: 20 matrix: 21 include: 22 - goos: linux 23 goarch: amd64 24 - goos: darwin 25 goarch: arm64 26 - goos: darwin 27 goarch: amd64 28 - goos: windows 29 goarch: amd64 30 ext: .exe 31 steps: 32 - uses: actions/checkout@v4 33 34 - uses: actions/setup-go@v5 35 with: 36 go-version: "1.25" 37 38 - name: Build 39 env: 40 CGO_ENABLED: "0" 41 GOOS: ${{ matrix.goos }} 42 GOARCH: ${{ matrix.goarch }} 43 run: go build -ldflags="-s -w" -o wrds-dl-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} . 44 45 - uses: actions/upload-artifact@v4 46 with: 47 name: wrds-dl-${{ matrix.goos }}-${{ matrix.goarch }} 48 path: go/wrds-dl-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} 49 50 release: 51 needs: [build] 52 runs-on: ubuntu-latest 53 if: startsWith(github.ref, 'refs/tags/') 54 permissions: 55 contents: write 56 steps: 57 - uses: actions/download-artifact@v4 58 59 - uses: softprops/action-gh-release@v2 60 with: 61 files: | 62 wrds-dl-linux-amd64/wrds-dl-linux-amd64 63 wrds-dl-darwin-arm64/wrds-dl-darwin-arm64 64 wrds-dl-darwin-amd64/wrds-dl-darwin-amd64 65 wrds-dl-windows-amd64/wrds-dl-windows-amd64.exe