43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: goreleaser
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
- name: Set up Go 1.13
|
|
id: go
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.13
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v1
|
|
with:
|
|
version: latest
|
|
args: release
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
- name: Copy release
|
|
id: copy
|
|
uses: ./.github/actions/copy-release-to-another-repo
|
|
with:
|
|
UPLOAD_OWNER_NAME: github
|
|
UPLOAD_REPO_NAME: homebrew-gh
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
UPLOAD_GITHUB_TOKEN: ${{secrets.UPLOAD_GITHUB_TOKEN}}
|
|
- name: Bump brew formula
|
|
uses: mislav/bump-homebrew-formula-action@v1.4
|
|
with:
|
|
formula-name: gh
|
|
homebrew-tap: github/homebrew-gh
|
|
download-url: ${{ steps.copy.outputs.asset-url }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.UPLOAD_GITHUB_TOKEN }}
|
|
COMMITTER_TOKEN: ${{ secrets.UPLOAD_GITHUB_TOKEN }}
|