-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 994 Bytes
/
build.yaml
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
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with: {go-version: '=1.19.8'}
- name: Decide what we're going to call this
run: |
TAG_SPECIFIC=${{ github.ref_name }}
# if we're building from a branch (i.e., not a tag) then add
# the short sha so we can have more than one build per branch
if [[ ${{ github.ref }} != refs/tags/* ]]; then
TAG_SPECIFIC=${TAG_SPECIFIC}-$(git rev-parse --short HEAD)
fi
echo $TAG_SPECIFIC
echo "TAG_SPECIFIC=$TAG_SPECIFIC" >> $GITHUB_ENV
- name: Make
run: |
make SUFFIX=${TAG_SPECIFIC} check build
- name: Create a new pre-release
if: startsWith(github.ref, 'refs/tags/')
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: |
epicctl
scripts/scan-logs