Skip to content

Commit

Permalink
Add GitHub workflow & GoReleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Mar 24, 2020
1 parent 5d11776 commit 7115c37
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v1
with: # Ideally this should be picked up from .go-version rather than hard-coded
go-version: 1.13.8
-
name: Release
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --skip-sign
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
before:
hooks:
- go test ./...

builds:
-
env:
- CGO_ENABLED=0
ldflags:
- '-s -w -X "github.com/hashicorp/terraform-ls/version.Version={{ .Version }}" -X "github.com/hashicorp/terraform-ls/version.Prerelease="'
targets:
- darwin_amd64
- freebsd_386
- freebsd_amd64
- freebsd_arm
- linux_386
- linux_amd64
- linux_arm
- openbsd_386
- openbsd_amd64
- solaris_amd64
- windows_386
- windows_amd64

archives:
-
format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
wrap_in_directory: false
files: # Avoid packaging any extra (default) files
- none*

checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256

changelog:
skip: true

0 comments on commit 7115c37

Please sign in to comment.