Skip to content

Commit

Permalink
Merge pull request #266 from accurics/terrascan-v1.0-goreleaser
Browse files Browse the repository at this point in the history
add goreleaser support
  • Loading branch information
kanchwala-yusuf committed Aug 10, 2020
2 parents e8a70f6 + ac8b93b commit 624c5b5
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gobuild.yml
@@ -1,4 +1,4 @@
name: Go Terrascan build
name: build
on:
push:
pull_request:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,29 @@
name: release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .goreleaser.yml
@@ -0,0 +1,33 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
main: ./cmd/terrascan/main.go
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
2 changes: 1 addition & 1 deletion README.md
@@ -1,5 +1,5 @@
# Terrascan
![CI](https://github.com/accurics/terrascan/workflows/Go%20Terrascan%20build/badge.svg)
![CI](https://github.com/accurics/terrascan/workflows/build/badge.svg)
[![codecov](https://codecov.io/gh/accurics/terrascan/branch/master/graph/badge.svg)](https://codecov.io/gh/accurics/terrascan)
[![community](https://img.shields.io/discourse/status?server=https%3A%2F%2Fcommunity.accurics.com)](https://community.accurics.com)
[![Documentation](https://readthedocs.org/projects/terrascan/badge/?version=latest)](https://terrascan.readthedocs.io/en/latest/?badge=latest)
Expand Down

0 comments on commit 624c5b5

Please sign in to comment.