-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·45 lines (40 loc) · 1.01 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
name: Create release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
packages: write
jobs:
publish:
name: Publish for ${{ matrix.goos }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goarch: amd64
goos: linux
binary: db-gen-linux
- goarch: amd64
goos: windows
binary: db-gen-win.exe
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: add version
run: echo "GITHUB_ACTIONS ${{ github.ref_name }} unknown" > version.txt
- name: check version
run: cat version.txt
- name: Build
run: env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o ${{ matrix.binary }} .
- name: LS
run: ls
- name: Create release
uses: softprops/action-gh-release@v1
with:
files: |
${{ matrix.binary }}