ci(npm-publish): update workflow (#746)

This commit is contained in:
Benoît Cortier
2025-04-14 13:00:13 +00:00
committed by GitHub
parent 0ff1ed8de5
commit 5e6746c1b6
3 changed files with 29 additions and 9 deletions
+24 -4
View File
@@ -32,11 +32,18 @@ jobs:
}
build:
name: Build package
name: Build package [${{matrix.library}}]
runs-on: ubuntu-latest
needs:
- preflight
strategy:
fail-fast: false
matrix:
library:
- iron-remote-desktop
- iron-remote-desktop-rdp
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -49,7 +56,7 @@ jobs:
- name: Install dependencies
shell: pwsh
run: |
Set-Location -Path ./web-client/iron-remote-gui/
Set-Location -Path "./web-client/${{matrix.library}}/"
npm install
- name: Build package
@@ -57,7 +64,7 @@ jobs:
run: |
Set-PSDebug -Trace 1
Set-Location -Path ./web-client/iron-remote-gui/
Set-Location -Path "./web-client/${{matrix.library}}/"
npm run build
Set-Location -Path ./dist
npm pack
@@ -73,9 +80,22 @@ jobs:
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: npm
name: npm-${{matrix.library}}
path: npm-packages/*.tgz
nuget-merge:
name: Merge artifacts
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: npm
pattern: npm-*
delete-merged: true
publish:
name: Publish package
runs-on: ubuntu-latest
+2 -3
View File
@@ -13,9 +13,8 @@
"type": "module",
"private": true,
"scripts": {
"dev": "npm run vite",
"build": "npm run vite build",
"build-alone": "vite build",
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check:dist": "tsc ./dist/index.d.ts --noEmit",
+3 -2
View File
@@ -57,11 +57,12 @@ const copyCoreFiles = async () => {
}
};
await run('npm run build', '../iron-remote-desktop');
let buildCommand = 'npm run build';
if (noWasm) {
buildCommand = 'npm run build-alone';
}
await run(buildCommand, '../iron-remote-desktop');
await run(buildCommand, '../iron-remote-desktop-rdp');
await copyCoreFiles();