-
Notifications
You must be signed in to change notification settings - Fork 5
161 lines (130 loc) · 6.64 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
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
160
161
name: 'publish'
on:
push:
branches:
- release
jobs:
publish:
strategy:
fail-fast: false
matrix:
# platform: [windows-2019, macos-11, ubuntu-20.04]
platform: [windows-2019, macos-11, ubuntu-22.04]
env:
MACOSX_DEPLOYMENT_TARGET: 10.13
permissions:
contents: write
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 18
- name: Retrieve version
run: |
echo "Retrieved App version: $(node -p -e "require('./package.json').version")"
echo "APP_VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT
id: version
shell: bash
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: stable
- name: install Go stable
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Environment setup
run: |
mkdir resources/default-apps
yarn setup:release
curl -L --output resources/default-apps/we.happ https://github.com/lightningrodlabs/we-electron/releases/download/we-alpha-happ-v0.8.0/we.happ
- name: Build zomes
run: |
rustup target add wasm32-unknown-unknown
yarn build:zomes
- name: setup binaries (Windows only)
if: matrix.platform == 'windows-2019'
run: |
mkdir resources/bins
cargo install --version 0.3.0 lair_keystore
$LkPath = Get-Command lair-keystore | Select-Object -ExpandProperty Definition
Copy-Item $LkPath -Destination resources/bins/lair-keystore-v0.3.0.exe
# curl -L --output resources/bins/lair-keystore-v0.3.0.exe https://github.com/matthme/launcher-electron/releases/download/lair-binaries-v0.3.0/lair-keystore-v0.3.0-x86_64-pc-windows-msvc.exe
cargo install holochain --version 0.2.4-rc.0 --locked --features sqlite-encrypted
$HcPath = Get-Command holochain | Select-Object -ExpandProperty Definition
Copy-Item $HcPath -Destination resources/bins/holochain-v0.2.4-rc.0.exe
# curl -L --output resources/bins/holochain-v0.2.4-rc.0.exe https://github.com/matthme/launcher-electron/releases/download/holochain-binaries-v0.2.4-rc.0/holochain-v0.2.4-rc.0-x86_64-pc-windows-msvc.exe
# NEW_VERSION: install new holochain version and copy its binary to the tauri path
- name: setup binaries (macos only)
if: matrix.platform == 'macos-11'
run: |
mkdir resources/bins
cargo install --version 0.3.0 lair_keystore
LAIR_PATH=$(which lair-keystore)
cp $LAIR_PATH resources/bins/lair-keystore-v0.3.0
# curl -L --output resources/bins/lair-keystore-v0.3.0 https://github.com/matthme/launcher-electron/releases/download/lair-binaries-v0.3.0/lair-keystore-v0.3.0-x86_64-apple-darwin
# chmod +x ./resources/bins/lair-keystore-v0.3.0
cargo install holochain --version 0.2.4-rc.0 --locked --features sqlite-encrypted
HOLOCHAIN_PATH=$(which holochain)
cp $HOLOCHAIN_PATH resources/bins/holochain-v0.2.4-rc.0
# curl -L --output resources/bins/holochain-v0.2.4-rc.0 https://github.com/matthme/launcher-electron/releases/download/holochain-binaries-v0.2.4-rc.0/holochain-v0.2.4-rc.0-x86_64-apple-darwin
# chmod +x ./resources/bins/holochain-v0.2.4-rc.0
# NEW_VERSION: install new holochain version and copy its binary to the tauri path
- name: setup binaries (ubuntu only)
if: matrix.platform == 'ubuntu-20.04' || matrix.platform == 'ubuntu-22.04'
run: |
mkdir resources/bins
cargo install --version 0.3.0 lair_keystore
LAIR_PATH=$(which lair-keystore)
cp $LAIR_PATH resources/bins/lair-keystore-v0.3.0
# curl -L --output resources/bins/lair-keystore-v0.3.0 https://github.com/matthme/launcher-electron/releases/download/lair-binaries-v0.3.0/lair-keystore-v0.3.0-x86_64-unknown-linux-gnu
# chmod +x ./resources/bins/lair-keystore-v0.3.0
cargo install holochain --version 0.2.4-rc.0 --locked --features sqlite-encrypted
HOLOCHAIN_PATH=$(which holochain)
cp $HOLOCHAIN_PATH resources/bins/holochain-v0.2.4-rc.0
# curl -L --output resources/bins/holochain-v0.2.4-rc.0 https://github.com/matthme/launcher-electron/releases/download/holochain-binaries-v0.2.4-rc.0/holochain-v0.2.4-rc.0-x86_64-unknown-linux-gnu
# chmod +x ./resources/bins/holochain-v0.2.4-rc.0
# NEW_VERSION: install new holochain version and copy its binary to the tauri path
- id: create-release
uses: ncipollo/release-action@v1
with:
body: 'See assets below to download and install this version.'
name: Lightningrodlabs We (Alpha) v${{ steps.version.outputs.APP_VERSION }}
tag: we-alpha-v${{ steps.version.outputs.APP_VERSION }}
prerelease: true
skipIfReleaseExists: true
- name: build and upload the app (macOS)
if: matrix.platform == 'macos-11'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn build:mac
ls dist
gh release upload "we-alpha-v${{ steps.version.outputs.APP_VERSION }}" "dist/org.lightningrodlabs.we-electron-alpha-${{ steps.version.outputs.APP_VERSION }}.dmg" --clobber
- name: build and upload the app (Linux)
if: matrix.platform == 'ubuntu-20.04'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn build:linux
ls dist
gh release upload "we-alpha-v${{ steps.version.outputs.APP_VERSION }}" "dist/org.lightningrodlabs.we-electron-alpha-${{ steps.version.outputs.APP_VERSION }}.AppImage" --clobber
- name: build and upload the app (Ubuntu 22.04)
if: matrix.platform == 'ubuntu-22.04'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn build:linux
ls dist
gh release upload "we-alpha-v${{ steps.version.outputs.APP_VERSION }}" "dist/org.lightningrodlabs.we-electron-alpha-${{ steps.version.outputs.APP_VERSION }}.AppImage" --clobber
- name: build and upload the app (Windows)
if: matrix.platform == 'windows-2019'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn build:win
ls dist
gh release upload "we-alpha-v${{ steps.version.outputs.APP_VERSION }}" "dist/org.lightningrodlabs.we-electron-alpha-${{ steps.version.outputs.APP_VERSION }}-setup.exe" --clobber