Skip to content

Merge pull request #983 from rainlanguage/2024-11-08-move-wasm-to-pac… #1

Merge pull request #983 from rainlanguage/2024-11-08-move-wasm-to-pac…

Merge pull request #983 from rainlanguage/2024-11-08-move-wasm-to-pac… #1

Workflow file for this run

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."