-
Notifications
You must be signed in to change notification settings - Fork 127
134 lines (117 loc) · 3.64 KB
/
Copy pathupload.yml
File metadata and controls
134 lines (117 loc) · 3.64 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Tag releases: source tarball (autotools distcheck) + static Meson binaries + publish.
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
source-tarball:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libtool pkg-config libsodium-dev
- name: distcheck
run: |
./autogen.sh
./configure --disable-dependency-tracking
make distcheck
- name: Upload source tarball artifact
uses: actions/upload-artifact@v4
with:
name: source-tarball
path: glorytun-*.tar.gz
linux-binaries:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- id: linux-x86_64-glibc-static
experimental: false
- id: linux-x86_64-musl-static
experimental: false
- id: linux-x86-musl-static
experimental: false
- id: linux-aarch64-musl-static
experimental: false
- id: linux-armv7-musl-static
experimental: false
- id: linux-mips-musl-static
experimental: true
- id: linux-mipsel-musl-static
experimental: true
- id: linux-mips64-musl-static
experimental: true
- id: linux-mips64el-musl-static
experimental: true
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y build-essential meson ninja-build pkg-config curl file git
- name: Install Zig (musl cross targets)
if: ${{ matrix.id != 'linux-x86_64-glibc-static' }}
uses: ziglang/setup-zig@v2
with:
version: 0.13.0
- name: Build static binary
id: build
continue-on-error: ${{ matrix.experimental }}
run: |
chmod +x scripts/ci/build-static-binary.sh
scripts/ci/build-static-binary.sh "${{ matrix.id }}"
- name: Upload binary artifact
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.id }}
path: glorytun-*-${{ matrix.id }}
if-no-files-found: error
macos-binary:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Build (darwin-arm64, libsodium static; links dynamically to system libs)
run: |
chmod +x scripts/ci/build-static-binary.sh
scripts/ci/build-static-binary.sh darwin-arm64
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: binary-darwin-arm64
path: glorytun-*-darwin-arm64
if-no-files-found: error
publish:
runs-on: ubuntu-latest
needs: [source-tarball, linux-binaries, macos-binary]
steps:
- name: Download release assets
uses: actions/download-artifact@v4
with:
pattern: '*'
merge-multiple: true
path: release-assets
- name: Create GitHub release and upload files
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
files: |
release-assets/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}