Skip to content

Commit

Permalink
wip: configure go releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
Stelio Sergio authored and snhane committed Oct 26, 2023
1 parent a6df416 commit 00b5eef
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: Go
on:
push:
branches: ["master"]
tags:
- 'v*'
pull_request:
branches: ["master"]

Expand All @@ -19,6 +21,8 @@ jobs:
release_id: ${{ steps.create_release.outputs.id }}
steps:
- uses: actions/checkout@v3
- run: go mod tidy
- run: go test -v ./...
- name: Bump release version and push tag
id: release
uses: anothrNick/github-tag-action@1.64.0 # Don't use @master or @v1 unless you're happy to test the latest version
Expand Down Expand Up @@ -90,3 +94,26 @@ jobs:
release_id: ${{ needs.dump_tag.outputs.release_id }}
asset_path: samora.exe
asset_name: samora-lang-win.exe
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
project_name: example
builds:
- env: [CGO_ENABLED=0]
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
nfpms:
- maintainer: Ismael GraHms <grahms@outlook.com>
description: Provides support for editing samora scripts with full support for font-locking, but no special keybindings, or indentation handling
homepage: https://github.com/GraHms/Samora-Lang
license: MIT
formats:
- deb
- rpm
- apk

0 comments on commit 00b5eef

Please sign in to comment.