-
-
Notifications
You must be signed in to change notification settings - Fork 77
46 lines (44 loc) · 1.29 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Release upload
"on":
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Install Go
if: success()
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Set environment variables
shell: bash
run: |
echo "GOPATH=${{ runner.workspace }}" >> $GITHUB_ENV
echo "${{ runner.workspace }}/bin" >> $GITHUB_PATH
- name: Setup XGO
run: go install github.com/crazy-max/xgo@latest
- name: Run dist
run: make dist
- name: Upload Asset to Release with a wildcard
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*.zip
- name: update homebrew
run: |
bash .github/update-homebrew-tap.sh
- name: Pushes homebrew-tap
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.TAP_GITHUB_TOKEN }}
with:
source_file: '.github/trdsql.rb'
destination_repo: 'noborus/homebrew-tap'
destination_branch: 'master'
user_email: '[email protected]'
user_name: 'Noboru Saito'
commit_message: 'Brew formula update for trdsql'