mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-20 17:02:53 -04:00
This is a fresh start for the `artcraft` repo. The old monorepo, which included our web API gateway, job services, SRE tools, various frontends, and more has moved to `artcraft-services` You can find the full git history here: https://github.com/storytold/artcraft-services This change was motivated by the fact that the entire git history was hundreds of gigabytes in size, which is unwieldy for anyone not in the core team that doesn't care about support services outside of the core artcraft app. We wanted to keep this repo in its well-known place since we already have users and activity here. Please update your remotes to either `artcraft-services` or make a fresh clone of this repo. History can be found at the artcraft-services repo.
105 lines
3.3 KiB
YAML
105 lines
3.3 KiB
YAML
name: "Artcraft Windows Publish"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- release
|
|
- artcraft-release
|
|
- artcraft-windows # Additional branch for Windows testing
|
|
|
|
# This workflow creates Windows builds.
|
|
# On each push to the release branches it will create or update a GitHub release, build your app, and upload the artifacts to the release.
|
|
|
|
jobs:
|
|
publish-artcraft-windows:
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# Windows builds
|
|
- platform: 'windows-latest'
|
|
args: ''
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: install wreq dependencies
|
|
run: |
|
|
choco install cmake -y
|
|
choco install strawberryperl -y
|
|
choco install pkgconfiglite -y
|
|
choco install llvm -y
|
|
choco install nasm -y
|
|
shell: cmd
|
|
|
|
- name: setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
|
|
- name: install frontend dependencies
|
|
run: |
|
|
# Navigate to the frontend directory to install dependencies
|
|
cd ./frontend
|
|
|
|
npm cache clean --force
|
|
|
|
echo "Installing all workspace dependencies..."
|
|
npm ci
|
|
|
|
echo "=== Version Information ==="
|
|
echo "Node version:"
|
|
node --version
|
|
echo "NPM version:"
|
|
npm --version
|
|
|
|
echo "=== Nx versions from lockfile ==="
|
|
npm list --depth=0 | findstr nx
|
|
|
|
- name: Pre-build frontend to avoid Tauri build issues
|
|
run: |
|
|
# Build the frontend app from the correct directory
|
|
cd ./frontend
|
|
|
|
# Increase Node.js memory limit for the build
|
|
$env:NODE_OPTIONS="--max-old-space-size=8192"
|
|
|
|
# Use npx to ensure we use the local nx version
|
|
echo "Building with npx nx..."
|
|
npx nx run artcraft:build
|
|
|
|
echo "Checking build output..."
|
|
dir apps/artcraft/dist/ | Select-Object -First 10
|
|
|
|
# Update Tauri config to skip the build (since we already built)
|
|
cd ${{ github.workspace }}/crates/desktop/artcraft
|
|
Copy-Item tauri.conf.json tauri.conf.json.bak
|
|
|
|
# Set beforeBuildCommand to empty using PowerShell
|
|
$config = Get-Content tauri.conf.json | ConvertFrom-Json
|
|
$config.build.beforeBuildCommand = ""
|
|
$config | ConvertTo-Json -Depth 10 | Set-Content tauri.conf.json
|
|
|
|
- name: build and publish
|
|
uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
# NB(bt): This is needed by wreq. Hopefully it doesn't kill Tauri
|
|
RUSTFLAGS: "-C target-feature=+crt-static"
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# Use the SQLx query cache for SQLite
|
|
SQLX_OFFLINE: true
|
|
with:
|
|
projectPath: ./crates/desktop/artcraft
|
|
tagName: artcraft-v__VERSION__ # the action automatically replaces __VERSION__ with the app version.
|
|
releaseName: "ArtCraft v__VERSION__"
|
|
releaseBody: "Production build of ArtCraft. See the assets below to download and install."
|
|
releaseDraft: true
|
|
prerelease: false
|
|
args: ${{ matrix.args }}
|