-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (41 loc) · 1.23 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
on:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#release
release:
types: [created]
name: Build Release
env:
GO_VERSION: "~1"
TASK_VERSION: v3.11.0
TASK_SUM: 8284fa89367e0bbb8ba5dcb90baa6826b7669c4a317e5b9a46711f7380075e21
jobs:
release:
name: Build binaries
runs-on: ubuntu-latest
steps:
#
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
#
- name: Tooling(checksum)
run: go install github.com/mdouchement/checksum@master
- name: Tooling(Taskfile)
run: |
curl -LO https://github.com/go-task/task/releases/download/${{ env.TASK_VERSION }}/task_linux_amd64.tar.gz && \
echo "${{ env.TASK_SUM }} task_linux_amd64.tar.gz" | sha256sum -c && \
tar -xf task_linux_amd64.tar.gz && \
cp task /usr/local/bin/
#
- name: Checkout code
uses: actions/checkout@v3
#
- name: Build binaries
run: task build-all
#
- name: Update release
run: go run .github/workflows/release.go
env:
# secrets.GITHUB_TOKEN is created by GH action and is limited to the repository
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}