Skip to content

Update flake

Update flake #70

name: "release-tauri-app"
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
publish-happ:
permissions:
contents: write
runs-on: ubuntu-22.04
outputs:
releaseId: ${{ steps.create-release.outputs.id }}
appVersion: ${{ steps.version.outputs.APP_VERSION }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Checks out a copy of your repository on the ubuntu-latest machine
- uses: actions/checkout@v3
- name: Extend space
uses: ./.github/actions/extend-space
- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev
- uses: cachix/cachix-action@v15
with:
name: darksoil-studio
- name: Build .webhapp
env:
CACHIX_AUTH_TOKEN: "${{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}"
run: |
cachix watch-exec darksoil-studio -- nix develop --no-update-lock-file --accept-flake-config --command bash -c "pnpm install && pnpm happ:build"
- name: Retrieve version
run: |
echo "APP_VERSION=$(cat src-tauri/tauri.conf.json | grep -oP '(?<="version": ")[^"]*')" >> $GITHUB_OUTPUT
id: version
- id: create-release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "workdir/plenty.webhapp"
body: "See assets below to download and install this version."
name: Plenty v${{ steps.version.outputs.APP_VERSION }}
tag: v${{ steps.version.outputs.APP_VERSION }}
prerelease: true
draft: true
release-tauri-app:
permissions: write-all
needs: publish-happ
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
- platform: 'macos-13' # for Intel based macs.
# - platform: 'ubuntu-22.04'
env:
MACOSX_DEPLOYMENT_TARGET: 10.13
runs-on: ${{ matrix.platform }}
steps:
- name: Support longpaths
if: matrix.platform != 'ubuntu-22.04'
run: git config --system core.longpaths true
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Checks out a copy of your repository on the ubuntu-latest machine
- uses: actions/checkout@v3
- name: Extend space
if: matrix.platform == 'ubuntu-22.04'
uses: ./.github/actions/extend-space
- name: Extend space macos
if: matrix.platform != 'ubuntu-22.04'
uses: ./.github/actions/extend-space-macos
- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev
- uses: cachix/cachix-action@v15
with:
name: darksoil-studio
- name: Install and prepare
run: |
nix develop --no-update-lock-file --command pnpm install
- name: Download release of the .happ
uses: robinraju/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
releaseId: ${{ needs.publish-happ.outputs.releaseId }}
fileName: 'plenty.webhapp'
out-file-path: 'workdir/'
- name: build the app
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 }}
with:
tauriScript: nix develop --no-update-lock-file --command pnpm tauri
releaseId: ${{ needs.publish-happ.outputs.releaseId }}
release-tauri-app-linux:
permissions: write-all
needs: publish-happ
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Checks out a copy of your repository on the ubuntu-latest machine
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9 # Optional: specify a pnpm version
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: 1.77.2
- name: install Go stable
uses: actions/setup-go@v4
with:
go-version: "stable"
- name: install dependencies (ubuntu only)
run: |
sudo apt update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install and prepare
run: |
pnpm install
- name: Download release of the .happ
uses: robinraju/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
releaseId: ${{ needs.publish-happ.outputs.releaseId }}
fileName: 'plenty.webhapp'
out-file-path: 'workdir/'
- name: build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ needs.publish-happ.outputs.releaseId }}
release-tauri-app-windows:
permissions: write-all
needs: publish-happ
runs-on: windows-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Checks out a copy of your repository on the ubuntu-latest machine
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9 # Optional: specify a pnpm version
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: 1.77.2
- name: install Go stable
uses: actions/setup-go@v4
with:
go-version: "stable"
- name: Install and prepare
run: |
pnpm install
- name: Download release of the .happ
uses: robinraju/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
releaseId: ${{ needs.publish-happ.outputs.releaseId }}
fileName: 'plenty.webhapp'
out-file-path: 'workdir/'
- name: build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ needs.publish-happ.outputs.releaseId }}