-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (42 loc) · 1.18 KB
/
upload-to-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
47
48
49
50
51
52
# .github/workflows/upload-to-release.yml
name: Go Release
on:
release:
#types: [published]
types: [created]
jobs:
release-matrix:
if: github.repository == 'bajins/webhook-go'
name: Build with go on ubuntu-latest and upload
runs-on: ubuntu-latest
#strategy:
#matrix:
#goos: [linux, windows, darwin]
#goarch: ["386", amd64]
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: '^1.20'
id: go
- name: Check out source code
uses: actions/checkout@v3
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build and compression
run: |
bash go_pack_embed.sh
- name: Upload to release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
with:
file: "build/webhook-go*;*.tar.gz;*.zip"
tags: true
draft: false
update_latest_release: true