mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 12:58:35 +07:00
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:
42
.github/workflows/release.yaml
vendored
Normal file
42
.github/workflows/release.yaml
vendored
Normal 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 }}
|
||||
Reference in New Issue
Block a user