mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-24 00:24:54 +01:00
Compare commits
2 Commits
yaak-cli-0
...
yaak-cli-0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
443e1b8262 | ||
|
|
c6b7cb2e32 |
40
.github/workflows/release-cli-npm.yml
vendored
40
.github/workflows/release-cli-npm.yml
vendored
@@ -33,12 +33,11 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: npm run bootstrap:install-wasm-pack
|
||||
|
||||
- name: Build plugin assets
|
||||
env:
|
||||
SKIP_WASM_BUILD: "1"
|
||||
run: |
|
||||
npm run build-plugins
|
||||
npm run build
|
||||
npm run vendor:vendor-plugins
|
||||
|
||||
- name: Upload vendored assets
|
||||
@@ -110,6 +109,39 @@ jobs:
|
||||
name: vendored-assets
|
||||
path: crates-tauri/yaak-app/vendored
|
||||
|
||||
- name: Set CLI build version
|
||||
shell: bash
|
||||
env:
|
||||
WORKFLOW_VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
VERSION="$WORKFLOW_VERSION"
|
||||
else
|
||||
VERSION="${GITHUB_REF_NAME#yaak-cli-}"
|
||||
fi
|
||||
VERSION="${VERSION#v}"
|
||||
echo "Building yaak version: $VERSION"
|
||||
python - "$VERSION" <<'PY'
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
version = sys.argv[1]
|
||||
manifest = pathlib.Path("crates-cli/yaak-cli/Cargo.toml")
|
||||
contents = manifest.read_text()
|
||||
updated, replacements = re.subn(
|
||||
r'(?m)^version = ".*"$',
|
||||
f'version = "{version}"',
|
||||
contents,
|
||||
count=1,
|
||||
)
|
||||
if replacements != 1:
|
||||
raise SystemExit("Failed to update yaak-cli version in Cargo.toml")
|
||||
manifest.write_text(updated)
|
||||
print(f"Updated {manifest} to version {version}")
|
||||
PY
|
||||
|
||||
- name: Build yaak
|
||||
run: cargo build --locked --release -p yaak-cli --bin yaak --target ${{ matrix.target }}
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
"app-dev": "node scripts/run-dev.mjs",
|
||||
"migration": "node scripts/create-migration.cjs",
|
||||
"build": "npm run --workspaces --if-present build",
|
||||
"build-plugins": "npm run --workspaces --if-present build",
|
||||
"test": "npm run --workspaces --if-present test",
|
||||
"icons": "run-p icons:*",
|
||||
"icons:dev": "tauri icon crates-tauri/yaak-app/icons/icon-dev.png --output crates-tauri/yaak-app/icons/dev",
|
||||
|
||||
Reference in New Issue
Block a user