-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.93 KB
/
buildTestBinaries.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
57
58
59
60
# This is a basic workflow to help you get started with Actions
name: Build test binaries
# Controls when the action will run. Triggers the workflow push is only on main branch and PR on any branch.
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-binaries:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-go@v5
with:
go-version: "^1.22" # The Go version to download (if necessary) and use.
check-latest: true
- name: Set version and ui_file
id: vars
run: |
git tag $(git describe --tags --abbrev=0)-$(git rev-parse --short HEAD)
echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
echo "ui_file=$(pwd)/.tmp/ui.tar.gz" >> $GITHUB_OUTPUT
- name: Build client
uses: goreleaser/goreleaser-action@v6
with:
# version of goreleaser which will be used
version: "~> v2"
args: release --clean --skip=validate --skip=publish
env:
UI_SEPARATOR: "--------UI--------"
UI_FILE: ${{ steps.vars.outputs.ui_file }}
- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: client_application-${{ steps.vars.outputs.version }}
path: |
.tmp/dist/*.tar.gz
.tmp/dist/*.zip
retention-days: 7