-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (54 loc) · 1.74 KB
/
release.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
profile: minimal
components: rustfmt, clippy
- uses: actions/setup-node@v2
if: matrix.os == 'windows-latest'
with:
node-version: '16'
- if: matrix.os == 'windows-latest'
uses: microsoft/[email protected]
- name: Build (Windows)
if: matrix.os == 'windows-latest'
run: |
cd windows-gui-client && yarn && yarn build && cd ..
cargo build --release
msbuild windows-gui-installer/titun-windows-gui-installer.sln /property:Configuration=Release /property:Platform=x64
cp windows-gui-installer/installer/bin/Release/titun.msi titun-$(uname -m).msi
- name: Build (linux/macos)
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: cargo build --release && xz --stdout target/release/titun > target/release/titun-$(uname -m)-${{ matrix.os == 'ubuntu-latest' && 'linux' || 'macos' }}.xz
- id: get_version
if: matrix.os == 'ubuntu-latest'
uses: battila7/get-version-action@v2
- name: Build Deb
if: matrix.os == 'ubuntu-latest'
uses: kentik/[email protected]
with:
name: titun
version: ${{ steps.get_version.outputs.version-without-v }}
arch: x86_64
format: deb
package: titun.pkg.yml
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
target/release/titun-*
*.deb
titun-*.msi