Use Github Actions instead of Circle CI (#124)

* Use Github Actions instead of CircleCI

* Add prerelease and release workflows

* Fix merge conflict

* Add release-note script

* Remove extra flags from build-all target on release workflows

* Upgrade golang-ci to v1.18.0
This commit is contained in:
Khosrow Moossavi
2019-12-12 16:22:53 -05:00
committed by GitHub
parent d03bfc94aa
commit 088d71ba1c
5 changed files with 144 additions and 94 deletions

42
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: release
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*-*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Build binaries for all OS/ARCH platforms
run: |
export PATH=$PATH:$(go env GOPATH)/bin
make gox build-all
- name: Generate Changelog
run: |
export PATH=$PATH:$(go env GOPATH)/bin
./scripts/release/release-note.sh
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: CURRENT-RELEASE-CHANGELOG.md
files: bin/terraform-docs-v*
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}