v0.8.1 #13
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 | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| # 1. Test on multiple platforms | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Run tests | |
| run: go test -v ./... | |
| # 2. Build binaries for multiple platforms | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| suffix: '' | |
| - goos: linux | |
| goarch: arm64 | |
| suffix: '' | |
| - goos: darwin | |
| goarch: amd64 | |
| suffix: '' | |
| - goos: darwin | |
| goarch: arm64 | |
| suffix: '' | |
| - goos: windows | |
| goarch: amd64 | |
| suffix: '.exe' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Build binary | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| run: | | |
| go build -o dot2net-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }} . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dot2net-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: dot2net-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }} | |
| # 3. Create GitHub Release and upload binaries | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release files | |
| run: | | |
| mkdir -p release | |
| find artifacts -type f -exec mv {} release/ \; | |
| ls -la release/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: release/* | |
| generate_release_notes: true |