Skip to content

Commit

Permalink
feat(github): add go releaser (#8)
Browse files Browse the repository at this point in the history
* feat(github): add go releaser

* add wasm builds
  • Loading branch information
mazzy89 authored Aug 14, 2024
1 parent 864ad35 commit 1ec8c8b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 12 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -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 }}
28 changes: 28 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 0 additions & 12 deletions .goreleaser.yml

This file was deleted.

0 comments on commit 1ec8c8b

Please sign in to comment.