-
Notifications
You must be signed in to change notification settings - Fork 12
95 lines (80 loc) · 2.34 KB
/
release.yml
File metadata and controls
95 lines (80 loc) · 2.34 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
suffix: linux-amd64
- goos: linux
goarch: arm64
suffix: linux-arm64
- goos: darwin
goarch: amd64
suffix: darwin-amd64
- goos: darwin
goarch: arm64
suffix: darwin-arm64
- goos: windows
goarch: amd64
suffix: windows-amd64.exe
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: '0'
run: go build -ldflags="-s -w" -o findns-${{ matrix.suffix }} ./cmd
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: findns-${{ matrix.suffix }}
path: findns-${{ matrix.suffix }}
build-slipstream:
runs-on: ubuntu-latest
steps:
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y cmake pkg-config libssl-dev git
- uses: dtolnay/rust-toolchain@stable
- name: Clone slipstream-rust
run: git clone --recursive https://github.com/Mygod/slipstream-rust.git /tmp/slipstream-rust
- name: Build slipstream-client
working-directory: /tmp/slipstream-rust
env:
PICOQUIC_AUTO_BUILD: '1'
run: cargo build -p slipstream-client --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: slipstream-client-linux-amd64
path: /tmp/slipstream-rust/target/release/slipstream-client
release:
needs: [build, build-slipstream]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Rename slipstream binary
run: |
mv artifacts/slipstream-client artifacts/slipstream-client-linux-amd64 2>/dev/null || true
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*
generate_release_notes: true