name: Release on: push: tags: - 'v*' permissions: contents: write jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 with: go-version: 1.21.x - name: Run tests run: go test -v ./... - name: Build binaries run: | # Build for different platforms GOOS=windows GOARCH=amd64 go build -o articulate-parser-windows-amd64.exe main.go GOOS=linux GOARCH=amd64 go build -o articulate-parser-linux-amd64 main.go GOOS=darwin GOARCH=amd64 go build -o articulate-parser-darwin-amd64 main.go GOOS=darwin GOARCH=arm64 go build -o articulate-parser-darwin-arm64 main.go - name: Create Release uses: softprops/action-gh-release@v1 with: files: | articulate-parser-windows-amd64.exe articulate-parser-linux-amd64 articulate-parser-darwin-amd64 articulate-parser-darwin-arm64 generate_release_notes: true draft: false prerelease: ${{ startsWith(github.ref, 'refs/tags/v0.') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}