forked from rainlanguage/rain.orderbook
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (103 loc) · 4.51 KB
/
tauri-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
name: Tauri Publish
# This will trigger the action on each push to the `release` branch.
on:
push:
branches:
- main
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [
macos-13,
macos-14,
ubuntu-22.04,
# Someone who cares can make windows work.
# windows-latest
]
runs-on: ${{ matrix.platform }}
env:
CI_FORK_SEPOLIA_BLOCK_NUMBER: ${{ vars.CI_FORK_SEPOLIA_BLOCK_NUMBER }}
CI_FORK_SEPOLIA_DEPLOYER_ADDRESS: ${{ vars.CI_FORK_SEPOLIA_DEPLOYER_ADDRESS }}
CI_DEPLOY_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }}
CI_DEPLOY_POLYGON_RPC_URL: ${{ secrets.CI_DEPLOY_POLYGON_RPC_URL }}
CI_SEPOLIA_METABOARD_URL: ${{ vars.CI_SEPOLIA_METABOARD_URL }}
RPC_URL_ETHEREUM_FORK: ${{ secrets.RPC_URL_ETHEREUM_FORK }}
COMMIT_SHA: ${{ github.sha }}
steps:
- name: Free up disk space in action runner (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get clean
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Free up disk space in action runner (Macos)
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
run: |
sudo rm -rf \
"$AGENT_TOOLSDIRECTORY" \
/opt/google/chrome \
/opt/microsoft/msedge \
/opt/microsoft/powershell \
/opt/pipx \
/usr/lib/mono \
/usr/local/julia* \
/usr/local/lib/android \
/usr/local/lib/node_modules \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/dotnet \
/usr/share/swift
df -h /
find /Applications/ -name "Xcode*" | sort -r | tail --lines=+2 | xargs rm -rf
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix develop -c rainix-sol-prelude
working-directory: lib/rain.interpreter
- run: nix develop -c rainix-rs-prelude
working-directory: lib/rain.interpreter
- run: nix develop -c rainix-sol-prelude
working-directory: lib/rain.interpreter/lib/rain.metadata
- run: nix develop -c rainix-rs-prelude
working-directory: lib/rain.interpreter/lib/rain.metadata
- run: nix develop -c rainix-sol-prelude
- run: nix develop -c rainix-rs-prelude
- run: nix develop -c raindex-prelude
- run: nix develop -c npm run build
- run: nix develop .#tauri-shell -c ob-tauri-prelude
- run: nix develop .#tauri-shell --command ob-tauri-before-build-ci
working-directory: ./tauri-app
env:
WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
- run: nix develop .#tauri-shell --command ob-tauri-before-release
working-directory: ./tauri-app
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_ORG: rainlang
SENTRY_PROJECT: rain-orderbook
COMMIT_SHA: ${{ github.sha }}
SENTRY_LOG_LEVEL: debug
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 }}
COMMIT_SHA: ${{ github.sha }}
with:
tauriScript: "nix develop -i -k COMMIT_SHA -k APPLE_CERTIFICATE -k APPLE_CERTIFICATE_PASSWORD -k APPLE_SIGNING_IDENTITY -k APPLE_ID -k APPLE_PASSWORD -k APPLE_TEAM_ID -k CI_DEPLOY_SEPOLIA_RPC_URL -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS -k CI_FORK_SEPOLIA_BLOCK_NUMBER -k CI_DEPLOY_POLYGON_RPC_URL -k CI_SEPOLIA_METABOARD_URL -k RPC_URL_ETHEREUM_FORK .#tauri-shell --command cargo tauri"
tagName: app-v__VERSION__-${{ github.sha }} # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: "App v__VERSION__-${{ github.sha }}"
releaseBody: "See the assets to download this version and install."