diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c7b30c4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.21.6 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: ${{ env.GITHUB_REF_NAME }} + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..6d2cc0e --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,35 @@ +builds: + - binary: cosmium + goos: + - darwin + - linux + - windows + goarch: + - amd64 + - arm64 + env: + - CGO_ENABLED=0 + ignore: + - goos: linux + goarch: arm64 + - goos: windows + goarch: arm64 + +release: + prerelease: auto + +universal_binaries: + - replace: true + +brews: + - name: cosmium + homepage: 'https://github.com/pikami/cosmium' + repository: + owner: pikami + name: homebrew-pikami + commit_author: + name: pikami + email: git@pikami.org + +checksum: + name_template: 'checksums.txt'