aboutsummaryrefslogtreecommitdiff
path: root/.build.yml
blob: 4d051e87b4ebab74377baa85cb9d263648aea9a6 (plain) (blame)
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

image: alpine/edge
secrets:
  - 1e5bf996-a5ca-4d31-9225-778cf90e3fba
packages:
  - go
  - hut
  - golangci-lint
  - make
  - gcc
  - musl-dev
tasks:
  - prepare: |
      cd forge
      git checkout go
  - build: |
      cd forge
      make
  - lint: |
      cd forge
      golangci-lint run .
  - upload: |
      cd forge
      x="$(git describe --exact || true)"
      if [ -z "$x" ]; then
      	printf 'Not a tag, not uploading artifacts\n' >&2
      else
      	mv forge forge-"$x"-linux-amd64
      	hut git artifact -r forge upload forge-"$x"-linux-amd64
      fi