-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (40 loc) · 1.15 KB
/
xgo.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Release Tags
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Version from Tag
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# Build and release CFFI artifacts
- name: Build CFFI
uses: crazy-max/ghaction-xgo@v3
with:
xgo_version: latest
go_version: latest
dest: cffi_dist
prefix: hazetunnel-api-${{ env.VERSION }}
targets: "*/*"
v: true
race: false
ldflags: -s -w
buildmode: c-shared
trimpath: true
working_dir: hazetunnel
- name: Upload CFFI Build Artifacts to Workflow
uses: actions/upload-artifact@v3
with:
name: cffi-build-artifacts-${{ env.VERSION }}
path: hazetunnel/cffi_dist/**
- name: Upload Release Assets with action-gh-release
uses: softprops/action-gh-release@v1
with:
files: hazetunnel/cffi_dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write