Debian Codegraph @

.github/workflows/upload-binaries.yaml

raw
1 name: Upload binaries
2 on:
3 push:
4 tags:
5 - "*"
6 jobs:
7 build-and-upload:
8 name: Build and upload
9 runs-on: ubuntu-latest
10 strategy:
11 matrix:
12 include:
13 - os: linux
14 arch: amd64
15 - os: linux
16 arch: arm
17 - os: linux
18 arch: 386
19 steps:
20 - name: Checkout repository
21 uses: actions/checkout@v2
22 - name: Setup Go
23 uses: actions/setup-go@v2
24 with:
25 go-version: 1.19.x
26 - name: Build binary
27 run: |
28 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o cliphist-${{ github.ref }}-${{ matrix.os }}-${{ matrix.arch }} .
29 - name: Upload
30 uses: svenstaro/upload-release-action@v2
31 with:
32 repo_token: ${{ secrets.CR_PAT }}
33 file: cliphist-${{ github.ref }}-${{ matrix.os }}-${{ matrix.arch }}
34 tag: ${{ github.ref }}