From c96a5c5fa3abcf1da3f88cc7cbca605622f5219e Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 31 Aug 2026 08:51:22 +0200 Subject: [PATCH 1/3] ci: attach app build to GitHub release as an asset Downstream consumers (compas_threejs) currently rebuild the app from source on every release. Publishing the prebuilt dist/ as a release asset lets them download it instead, avoiding a full Node.js toolchain and clone+build step during their own release. --- .github/workflows/release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 984669c..2b8fed5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: pull-requests: write outputs: release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} steps: - id: release uses: googleapis/release-please-action@v4 @@ -36,7 +37,7 @@ jobs: runs-on: ubuntu-latest environment: npm permissions: - contents: read + contents: write id-token: write steps: - uses: actions/checkout@v4 @@ -54,3 +55,16 @@ jobs: - name: Publish to npm run: npm publish --access public --provenance + + - name: Package app build for release + run: tar -czf compas-threejs-ts-dist.tar.gz -C dist . + + - name: Upload app build to release + env: + GH_TOKEN: ${{ github.token }} + run: | + tag="${{ needs.release-please.outputs.tag_name }}" + if [ -z "$tag" ]; then + tag="v$(node -p "require('./package.json').version")" + fi + gh release upload "$tag" compas-threejs-ts-dist.tar.gz --clobber From 5fcf8d6b204aef752367d387b19a4c4bd615b2bd Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 31 Aug 2026 11:00:17 +0200 Subject: [PATCH 2/3] fix(release): publish app build via npm files instead of a release asset Ship dist/ in the npm package itself by adding it to "files" -- it's already built by prepublishOnly's check step, so no extra packaging or upload step is needed. Consumers (compas_threejs) can now npm install this package and read the built app straight out of node_modules, which is simpler than fetching a separate GitHub release asset. Reverts the previous approach's workflow changes. --- .github/workflows/release.yml | 16 +--------------- package.json | 3 ++- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b8fed5..984669c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,6 @@ jobs: pull-requests: write outputs: release_created: ${{ steps.release.outputs.release_created }} - tag_name: ${{ steps.release.outputs.tag_name }} steps: - id: release uses: googleapis/release-please-action@v4 @@ -37,7 +36,7 @@ jobs: runs-on: ubuntu-latest environment: npm permissions: - contents: write + contents: read id-token: write steps: - uses: actions/checkout@v4 @@ -55,16 +54,3 @@ jobs: - name: Publish to npm run: npm publish --access public --provenance - - - name: Package app build for release - run: tar -czf compas-threejs-ts-dist.tar.gz -C dist . - - - name: Upload app build to release - env: - GH_TOKEN: ${{ github.token }} - run: | - tag="${{ needs.release-please.outputs.tag_name }}" - if [ -z "$tag" ]; then - tag="v$(node -p "require('./package.json').version")" - fi - gh release upload "$tag" compas-threejs-ts-dist.tar.gz --clobber diff --git a/package.json b/package.json index c43ea66..84f4986 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "./style.css": "./dist-lib/style.css" }, "files": [ + "dist", "dist-lib", "LICENSE", "README.md" @@ -71,7 +72,7 @@ "devDependencies": { "@bufbuild/protobuf": "^2.13.0", "@eslint/js": "^10.0.1", - "@gramaziokohler/compas-pb-ts": "^2.0.0", + "@gramaziokohler/compas-pb-ts": "^3.0.0", "@playwright/test": "^1.62.1", "@tailwindcss/vite": "^4.3.3", "@types/node": "^24.13.3", From 51e35dc99de7348e05d5fa593ec7cbd2a853a8f1 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 31 Aug 2026 12:59:04 +0200 Subject: [PATCH 3/3] fix: revert accidental compas-pb-ts devDependency bump This bump to ^3.0.0 was pulled in unintentionally alongside the "files" change in the previous commit; package-lock.json was never regenerated to match, which broke `npm ci` in CI (EUSAGE: lock file out of sync). Reverting to ^2.0.0, matching main and the committed lock file. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84f4986..9cc04e9 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "devDependencies": { "@bufbuild/protobuf": "^2.13.0", "@eslint/js": "^10.0.1", - "@gramaziokohler/compas-pb-ts": "^3.0.0", + "@gramaziokohler/compas-pb-ts": "^2.0.0", "@playwright/test": "^1.62.1", "@tailwindcss/vite": "^4.3.3", "@types/node": "^24.13.3",