From e33c16f06b87f15106ef4c4c0962805bd1d50808 Mon Sep 17 00:00:00 2001 From: Salvatore Mazzarino Date: Fri, 2 Aug 2024 13:24:56 +0200 Subject: [PATCH 1/2] feat(github): add go releaser --- .github/workflows/releaser.yml | 30 +++++++++++++++++++++++++++++ .goreleaser.yml => .goreleaser.yaml | 16 ++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/releaser.yml rename .goreleaser.yml => .goreleaser.yaml (56%) 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.yml b/.goreleaser.yaml similarity index 56% rename from .goreleaser.yml rename to .goreleaser.yaml index 0e6977d..bb3cadc 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yaml @@ -1,6 +1,11 @@ project_name: gnopls + +before: + hooks: + - go mod tidy + builds: - - main: . + - id: gnopls ldflags: - -s -w -X github.com/gnolang/gnopls/internal/version.Version={{.Tag}} goos: @@ -10,3 +15,12 @@ builds: - amd64 - arm64 binary: gnopls + +changelog: + sort: asc + +release: + draft: true + replace_existing_draft: true + prerelease: auto + mode: append \ No newline at end of file From 91f3f5e7f15b2ec699a5c499329abed5de695f15 Mon Sep 17 00:00:00 2001 From: Salvatore Mazzarino Date: Fri, 9 Aug 2024 20:00:03 +0200 Subject: [PATCH 2/2] add wasm builds --- .goreleaser.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index bb3cadc..8744cfe 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -6,15 +6,17 @@ before: builds: - id: gnopls - ldflags: - - -s -w -X github.com/gnolang/gnopls/internal/version.Version={{.Tag}} + binary: gnopls goos: - linux - darwin + - js goarch: - amd64 - arm64 - binary: gnopls + - wasm + ldflags: + - -s -w -X 'github.com/gnolang/gnopls/internal/version.Version={{.Tag}}' changelog: sort: asc