forked from elastic/crd-ref-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 943 Bytes
/
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
name: Release
on:
push:
tags:
- v*
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22.x
- run: ./test.sh
- run: go mod download
- run: go test -v ./...
release:
needs: test
strategy:
matrix:
os: ["linux","windows","darwin"]
arch: ["amd64","arm64"]
name: Release
runs-on: ubuntu-latest
steps:
- run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o release/crd-ref-docs-${{ matrix.os }}-${{ matrix.arch }} -v .
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/crd-ref-docs-${{ matrix.os }}-${{ matrix.arch }}
asset_name: crd-ref-docs-${{ matrix.os }}-${{ matrix.arch }}
tag: ${{ github.ref }}