Files
terraform-docs/.github/workflows/release.yaml
dependabot[bot] 55cf46abd5 build: bump dawidd6/action-homebrew-bump-formula from v3.5.0 to v3.5.1 (#361)
Bumps [dawidd6/action-homebrew-bump-formula](https://github.com/dawidd6/action-homebrew-bump-formula) from v3.5.0 to v3.5.1.
- [Release notes](https://github.com/dawidd6/action-homebrew-bump-formula/releases)
- [Commits](https://github.com/dawidd6/action-homebrew-bump-formula/compare/v3.5.0...a3cb816c8ae5c3f48686e9d556b00c43c1109891)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-04 15:08:38 -05:00

74 lines
2.0 KiB
YAML

name: release
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*-*'
jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15.1
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- 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 }}
docker:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set version output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF:11} # tag name without leading 'v'
- name: Build and push Docker image
run: |
echo ${REGISTRY_PASSWORD} | docker login -u ${REGISTRY_USERNAME} --password-stdin quay.io
DOCKER_TAG=${{ steps.vars.outputs.tag }} make docker push
DOCKER_TAG=latest make docker push
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
homebrew:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Bump Homebrew formula version
uses: dawidd6/action-homebrew-bump-formula@v3.5.1
if: "!contains(github.ref, '-')" # skip prereleases
with:
token: ${{ secrets.COMMITTER_TOKEN }}
formula: terraform-docs