-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.19 KB
/
release.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
36
37
38
39
40
41
42
43
44
45
46
name: Release
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
permissions:
contents: write
on:
push:
# run only against tags
tags:
- "*"
jobs:
linux:
runs-on: ubuntu-latest
if: github.repository_owner == 'wandb'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
- name: Install gpgme dependencies and 32-bit libraries
run: |
sudo apt-get update
sudo apt-get install -y libgpgme-dev gcc-multilib
- name: Set environment variables for CGO
run: |
echo "CGO_ENABLED=1" >> $GITHUB_ENV
echo "CGO_CFLAGS=-I/usr/include" >> $GITHUB_ENV
echo "CGO_LDFLAGS=-L/usr/lib" >> $GITHUB_ENV
- name: Install Go dependencies
run: go mod tidy
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CGO_ENABLED: 1
CGO_CFLAGS: -I/usr/include
CGO_LDFLAGS: -L/usr/lib