Releasing AssetForge
Build a release#
npm run check # typecheck, lint, format, tests, licenses, audit
npm run release:minor # or release:patch / release:major
npm version bumps the version, moves the "Unreleased" changelog section under the new version, commits, tags vX.Y.Z and then runs npm run dist (scripts/dist.mjs):
electron-vite buildelectron-builder --win --publish never: NSIS installer, portable exe,latest.ymland the installer's.blockmapindist/. Nothing is uploaded.- Signature check of the installer (
Get-AuthenticodeSignature) scripts/archive-versions.mjs: copies everything toversions/vX.Y.Z/with the source zip andNOTES.md, and refreshesversions/index.htmlandINDEX.md(with a signature column).
To update the AssetForge installed on this computer to the new build (nothing is uploaded):
npm run install:local # newest versions/vX.Y.Z installer
npm run install:local -- 0.34.0 # a given version
scripts/install-local.mjs runs the installer silently over the existing install; the folder, shortcuts and user data (account, settings, projects) are kept. If the installed AssetForge is open it stops without touching anything, so unsaved work is not lost.
Smoke-test the packaged app before publishing, in an isolated folder so your own settings and projects are not touched:
FORGE_PROJECT_DIR=<empty folder> FORGE_SNAPSHOT=<file.png> dist/win-unpacked/AssetForge.exe --user-data-dir=<empty folder>
Code signing#
Without a certificate the build is unsigned: Windows SmartScreen warns on first launch ("More info → Run anyway") and NOTES.md says "unsigned". To sign, set one of these before npm run dist:
| Method | Environment variables |
|---|---|
| Certificate file (.pfx / .p12, OV or EV exported) | CSC_LINK (path or base64), CSC_KEY_PASSWORD |
| Azure Trusted Signing | AZURE_SIGN_ENDPOINT, AZURE_SIGN_ACCOUNT, AZURE_SIGN_PROFILE, AZURE_SIGN_PUBLISHER and the Azure credentials AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET |
Set FORGE_REQUIRE_SIGNING=1 on the release machine to make the build fail when the installer does not carry a valid signature. When a signed build is installed, the updater also checks that a downloaded update is signed by the same publisher.
Publish on GitHub#
Create a release for the tag vX.Y.Z and upload, from versions/vX.Y.Z/:
AssetForge-Setup-X.Y.Z.exeAssetForge-Setup-X.Y.Z.exe.blockmaplatest.ymlAssetForge-X.Y.Z-Portable.exe
Installed copies look for latest.yml in the latest (non-draft, non-prerelease) release. Without it they do not see the new version. Paste the version's changelog section as the release notes; the app shows them in Settings → About → Updates.
How updating works in the app#
- Installed version: checks GitHub Releases 15 seconds after start and once a day (Settings → About → Updates, can be turned off; only release info is requested). When a new version is found it shows a button in the top bar. Download fetches the installer and verifies its SHA-512 from
latest.yml. Restart and install runs the installer silently and reopens the app. While a job, build or trailer is running it refuses; the update then installs when you close the app. Settings, keys and projects are kept. - Portable version: only reports the new version and links to the release page.
- Development (
npm run dev): off.
Testing an update without publishing#
Serve a folder with a latest.yml (higher version) and the installer it names, then start the packaged app with FORGE_UPDATE_URL:
python -m http.server 9599 --bind 127.0.0.1 --directory <feed folder>
FORGE_UPDATE_URL=http://127.0.0.1:9599/ LOCALAPPDATA=<temp folder> dist/win-unpacked/AssetForge.exe --user-data-dir=<temp folder>
With FORGE_UPDATE_URL the app checks, downloads and verifies but never runs the installer (neither from the button nor on exit), so the AssetForge installed on this computer is not replaced. Add FORGE_UPDATE_INSTALL=1 only on a test machine where installing is fine. LOCALAPPDATA moves the download cache (assetforge-updater) off the system drive.
Documentation site#
The guides in docs/guide/, the generated reference in docs/reference/, docs/FORMAT.md, this page and the release notes are published to https://herkanuzun.github.io/AssetForge/ by .github/workflows/docs.yml on every push to main that touches docs/, CHANGELOG.md or package.json. Enable it once under Settings → Pages → Source: GitHub Actions.
Addresses. Pages have clean addresses: en/guide/install/#connect-services. The latest docs live at <lang>/… and are also copied to v/<minor>/<lang>/… with a canonical link to the latest address. Every earlier minor version has its own docs under v/<minor>/, read from the newest Release vX.Y.Z commit of that minor in the git history (from 0.19, the first version with docs/guide/); those pages carry a banner that links to the same page in the latest docs and to the release notes. The old guide/install.html addresses (opened by 0.36 and earlier) redirect to the new ones, and 404.html sends an unknown version, language or page to the nearest page that exists.
The Help button opens v/<installed minor>/<interface language>/<page> (src/shared/docs.ts); a test checks that every page and heading it links to exists in every language.
Languages. English is the source. Translations live in docs/i18n/<lang>/ with the same file names (tr, es, zh-CN; the list is LANGS in scripts/docs-site.mjs and DOCS_LANGS in src/shared/docs.ts).
- A translation starts with `
, the hash of the English file it was translated from.node scripts/docs-site.mjs --i18n-status` lists every page per language as translated, outdated or missing, with the hash to use. - Keep the English anchors: end every translated
##/###heading with{#english-anchor}. A test checks that a translation has the same headings and anchors as its English page. - A page with no translation is shown in English with a note and marked EN in the menu; an outdated translation is shown with a note and a link to the English page. Neither breaks the build.
- Button and menu names stay as the app shows them: Turkish in
tr, English in the other languages.
Building.
npm run docs:sitebuilds the latest docs intosite/with no dependencies; it fails on broken links or missing anchors in any language.node scripts/docs-site.mjs site --versionsadds every earlier version from the git history (as the workflow does); broken links in old versions are only warnings.- The node and MCP reference pages are generated from the code.
npm testfails when they are out of date;npm run docs:refrewrites them. - A new guide page must be added to
NAVinscripts/docs-site.mjs(a test checks that no page is left out).