-
Notifications
You must be signed in to change notification settings - Fork 12
121 lines (105 loc) · 3.86 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
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
name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
# (required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
upload-assets-mycelium:
needs: create-release
strategy:
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
# Name of the compiled binary, also name of the non-extension part of the produced file
bin: mycelium
# --target flag value, default is host
target: ${{ matrix.target }}
# Name of the archive when uploaded
archive: $bin-$target
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
# Specify manifest since we are in a subdirectory
manifest-path: myceliumd/Cargo.toml
# TODO: Figure out the correct matrix setup to have this in a single action
upload-assets-myceliumd-private:
needs: create-release
strategy:
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
# Name of the compiled binary, also name of the non-extension part of the produced file
bin: mycelium-private
# Set the vendored-openssl flag for provided release builds
features: vendored-openssl
# --target flag value, default is host
target: ${{ matrix.target }}
# Name of the archive when uploaded
archive: $bin-$target
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
# Specify manifest since we are in a subdirectory
manifest-path: myceliumd-private/Cargo.toml
build-msi:
needs: create-release
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Create .exe file
shell: bash
run: cd myceliumd && RUSTFLAGS="-C target-feature=+crt-static" cargo build --release && cd ..
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4.0.0
- name: Install WiX Toolset
run: dotnet tool install --global wix
- name: Add WixToolset.UI.wixext extension
run: wix extension add WixToolset.UI.wixext
- name: Download Wintun zip file
run: curl -o wintun.zip https://www.wintun.net/builds/wintun-0.14.1.zip
- name: Unzip Wintun
run: unzip wintun.zip
- name: Move .dll file to myceliumd directory
run: move wintun\bin\amd64\wintun.dll myceliumd
- name: Build MSI package
run: wix build -loc installers\windows\wix\mycelium.en-us.wxl installers\windows\wix\mycelium.wxs -ext WixToolset.UI.wixext -arch x64 -dcl high -out mycelium_installer.msi
- name: Upload MSI artifact
uses: alexellis/upload-assets@0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["mycelium_installer.msi"]'