diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml new file mode 100644 index 0000000..72553d6 --- /dev/null +++ b/.github/workflows/releaser.yml @@ -0,0 +1,30 @@ +name: Go Releaser + +on: + push: + tags: + - "v*" + +permissions: + contents: write # needed to write releases + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version: "1.21.x" + cache: true + + - uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: v1.26.2 + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..8744cfe --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,28 @@ +project_name: gnopls + +before: + hooks: + - go mod tidy + +builds: + - id: gnopls + binary: gnopls + goos: + - linux + - darwin + - js + goarch: + - amd64 + - arm64 + - wasm + ldflags: + - -s -w -X 'github.com/gnolang/gnopls/internal/version.Version={{.Tag}}' + +changelog: + sort: asc + +release: + draft: true + replace_existing_draft: true + prerelease: auto + mode: append \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index 0e6977d..0000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,12 +0,0 @@ -project_name: gnopls -builds: - - main: . - ldflags: - - -s -w -X github.com/gnolang/gnopls/internal/version.Version={{.Tag}} - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - binary: gnopls