diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4564925 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release Go binaries +on: + push: + tags: ['v*'] +permissions: + contents: write +jobs: + release: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - goos: linux + goarch: amd64 + - goos: linux + goarch: arm64 + - goos: darwin + goarch: amd64 + - goos: darwin + goarch: arm64 + - goos: windows + goarch: amd64 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: { go-version: '1.25' } + - name: Build + run: | + GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \ + go build -o molecli-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.goos == 'windows' && '.exe' || '' }} \ + ./cmd/molecli + - uses: softprops/action-gh-release@v2 + with: + files: molecli-*