-
Notifications
You must be signed in to change notification settings - Fork 16
159 lines (143 loc) · 4.93 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
name: Release
'on':
push:
paths-ignore:
- '**/*.md'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- 'main'
- 'build-*'
workflow_dispatch:
concurrency:
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/main' }}
permissions: {}
jobs:
builds:
name: Building ${{ matrix.platform }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "ubuntu-22.04"
args: ""
- platform: "windows-2019"
args: ""
- platform: "macos-latest"
args: "--verbose --target universal-apple-darwin"
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Node.js setup
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
- name: Rust setup (native)
uses: dtolnay/rust-toolchain@stable
with:
targets: 'wasm32-unknown-unknown'
- name: Rust setup (macOS)
if: startsWith(runner.os,'macOS')
uses: dtolnay/rust-toolchain@stable
with:
target: aarch64-apple-darwin,x86_64-apple-darwin
- name: Rust setup (linux)
if: startsWith(runner.os,'Linux')
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: aarch64-unknown-linux-gnu
- name: Cache cargo files and outputs
if: ${{ ( ! startsWith(github.ref, 'refs/tags/v') ) }}
uses: Swatinem/rust-cache@v2
- name: Install dependencies (macOS)
if: startsWith(runner.os,'macOS')
run: |
# openssl, cmake, autoconf and zip already installed
brew install coreutils automake protobuf
- name: Install dependencies (linux)
if: startsWith(runner.os,'Linux')
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --assume-yes \
libwebkit2gtk-4.0-dev \
build-essential \
wget \
file \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libsoup2.4-dev \
patchelf \
apt-transport-https \
ca-certificates \
curl \
gpg \
openssl \
libssl-dev \
pkg-config \
libsqlite3-dev \
git \
cmake \
dh-autoreconf \
libc++-dev \
libc++abi-dev \
libprotobuf-dev \
protobuf-compiler \
libncurses5-dev \
libncursesw5-dev \
zip
- name: Install dependencies (windows)
if: startsWith(runner.os,'Windows')
shell: bash
run: |
vcpkg.exe install sqlite3:x64-windows zlib:x64-windows
# Bug in choco - need to install each package individually
choco upgrade llvm -y
# psutils is out of date
# choco upgrade psutils -y
choco upgrade openssl -y
# Should already be installed
# choco upgrade strawberryperl -y
choco upgrade protoc -y
echo "SQLITE3_LIB_DIR=C:\vcpkg\installed\x64-windows\lib" >> $GITHUB_ENV
echo "OPENSSL_DIR=C:\Program Files\OpenSSL-Win64" >> $GITHUB_ENV
echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $GITHUB_ENV
echo "C:\Strawberry\perl\bin" >> $GITHUB_PATH
- name: Install dependencies (node)
run: |
yarn
cd ui/frontend
yarn install
- name: Build Tauri apps
uses: tauri-apps/tauri-action@v0
id: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
projectPath: ui
includeDebug: ${{ ( ! startsWith(github.ref, 'refs/tags/v') ) }}
includeRelease: ${{ ( startsWith(github.ref, 'refs/tags/v') ) }}
releaseBody: "Tari-Launcher."
releaseDraft: true
prerelease: true
args: ${{ matrix.args }}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: tari-launchpad_${{ steps.build.outputs.appVersion }}_${{ matrix.platform }}
path: "${{ join(fromJSON(steps.build.outputs.artifactPaths), '\n') }}"