-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.07 KB
/
cd.yml
File metadata and controls
48 lines (41 loc) · 1.07 KB
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
name: CD
on:
push:
tags:
- '*'
jobs:
build_release:
name: build_release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.25.3
- name: Build
run: |
env GOOS=linux GOARCH=amd64 go build
gzip --keep bricks-cli
mv bricks-cli.gz bricks-cli-linux-x64.gz
env GOOS=windows GOARCH=amd64 go build
zip bricks-cli-windows-x64.zip bricks-cli.exe
- name: Version
run: |
v=$(./bricks-cli --version)
echo "name=version::${v:15}" >> $GITHUB_OUTPUT
id: version
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
name: ${{ steps.version.outputs.version }}
files: |
./bricks-cli-linux-x64.gz
./bricks-cli-windows-x64.zip
env:
GITHUB_TOKEN: ${{ github.token }}