-
Notifications
You must be signed in to change notification settings - Fork 23
56 lines (48 loc) · 1.42 KB
/
release-go-binaries.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
47
48
49
50
51
52
53
54
55
56
name: Tag and Release Go Binaries
on:
push:
branches:
- master
paths:
- "version/ts-bridge-version.go"
jobs:
tag-current-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up ts-bridge version
run: echo "ts-bridge-version=$(grep -oP 'Ver = \"\K[^\"]+' version/ts-bridge-version.go)" >> $GITHUB_ENV
- name: Create Release Tag with current commit
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.ts-bridge-version }}
release_name: ${{ env.ts-bridge-version }}
draft: false
prerelease: false
release-go-binaries:
needs: tag-current-commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set versions
run: echo "go-version=$(cat .go-version)" >> $GITHUB_ENV
- name: Set up Go according to .go-version
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}
- name: Run GoReleaser according to .goreleaser.yml
uses: goreleaser/goreleaser-action@v6
with:
workdir: app/
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}