ci / web (push) Successful in 57s
ci / docs-site (push) Successful in 1m23s
apple / swift (push) Successful in 5m39s
ci / bench (push) Successful in 5m53s
ci / rust-arm64 (push) Successful in 10m18s
ci / rust (push) Failing after 13m3s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 10s
decky / build-publish (push) Successful in 21s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 17s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 53s
docker / build-push (ci, ci/rust-ci-noble.Dockerfile, punktfunk-rust-ci-noble) (push) Successful in 21s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 10s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 10s
android / android (push) Successful in 16m17s
arch / build-publish (push) Successful in 16m23s
deb / build-publish (push) Successful in 9m14s
deb / build-publish-host (push) Successful in 10m6s
deb / build-publish-client-arm64 (push) Successful in 7m26s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Successful in 23m41s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Successful in 23m52s
apple / screenshots (push) Successful in 25m45s
docker / build-push-arm64cross (push) Successful in 15s
docker / deploy-docs (push) Successful in 26s
The publish workflow has been failing at Typecheck with "cannot find module '@punktfunk/host'" — every import of the SDK, in a job whose previous step built that very SDK successfully. bun 1.3 installs a `file:` dependency by copying its DIRECTORIES but symlinking each top-level FILE to itself: `node_modules/@punktfunk/host/package.json -> package.json`, a dangling self-reference. So `dist/index.d.ts` arrives intact while the manifest that points at it does not, and resolution dies at the first step it takes. The types were never missing; nothing could find the front door. Replacing that tree with a real copy is the whole fix, and the step no-ops itself the moment bun links `file:` deps correctly again. Not a regression from anything in the kit — it has been broken since bun updated, and went unnoticed because nothing has been published since 0.1.4. Verified from a clean node_modules: install → repair → typecheck → 20 tests → build, all green.
89 lines
3.5 KiB
YAML
89 lines
3.5 KiB
YAML
# Publish the plugin framework (@punktfunk/plugin-kit) to the Gitea npm registry
|
|
# (https://git.unom.io/api/packages/unom/npm/).
|
|
#
|
|
# Trigger: push a tag `plugin-kit-vX.Y.Z` (must equal plugin-kit/package.json "version"),
|
|
# or run manually. Versions independently of the app's `v*` and the SDK's `sdk-v*` tags.
|
|
#
|
|
# The kit's devDependency on @punktfunk/host is `file:../sdk`, so the SDK's dist must be
|
|
# built BEFORE the kit's `bun install` copies it.
|
|
#
|
|
# Auth: REGISTRY_TOKEN — the same repo Actions secret sdk-publish.yml uses.
|
|
name: plugin-kit-publish
|
|
|
|
on:
|
|
push:
|
|
tags: ['plugin-kit-v*']
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: oven/bun:1
|
|
timeout-minutes: 15
|
|
steps:
|
|
# oven/bun's slim base ships neither git, a CA bundle, nor node — actions/checkout's HTTPS
|
|
# fetch needs git + ca-certificates, and the version-guard step below uses node.
|
|
- name: Install git + node + CA certs
|
|
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git nodejs
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build the SDK (file:../sdk dependency source)
|
|
working-directory: sdk
|
|
run: |
|
|
bun install --frozen-lockfile --ignore-scripts
|
|
bun run build
|
|
|
|
- name: Install dependencies
|
|
working-directory: plugin-kit
|
|
run: bun install --frozen-lockfile --ignore-scripts
|
|
|
|
# bun 1.3 installs a `file:` dependency by copying its DIRECTORIES but symlinking each
|
|
# top-level FILE to itself — `node_modules/@punktfunk/host/package.json -> package.json`, a
|
|
# dangling self-reference. `dist/` therefore arrives intact while the manifest that points at
|
|
# it does not, so module resolution dies at the first step and every `@punktfunk/host` import
|
|
# reads as "cannot find module". Replacing the tree with a real copy is the whole fix; drop
|
|
# this step once bun links `file:` deps correctly again.
|
|
- name: Repair the file: dependency (bun 1.3 self-symlink)
|
|
working-directory: plugin-kit
|
|
run: |
|
|
# -f follows the link, so this is true only when the manifest actually resolves.
|
|
if test -f node_modules/@punktfunk/host/package.json; then
|
|
echo "bun linked it correctly — this step can go"
|
|
else
|
|
rm -rf node_modules/@punktfunk/host
|
|
cp -R ../sdk node_modules/@punktfunk/host
|
|
fi
|
|
test -f node_modules/@punktfunk/host/package.json
|
|
test -f node_modules/@punktfunk/host/dist/index.d.ts
|
|
|
|
- name: Typecheck
|
|
working-directory: plugin-kit
|
|
run: bun run typecheck
|
|
|
|
- name: Test
|
|
working-directory: plugin-kit
|
|
run: bun test
|
|
|
|
- name: Build (dist/ JS + .d.ts + theme.css)
|
|
working-directory: plugin-kit
|
|
run: bun run build
|
|
|
|
- name: Tag matches package version
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
working-directory: plugin-kit
|
|
run: |
|
|
TAG="${GITHUB_REF_NAME#plugin-kit-v}"
|
|
PKG="$(node -p "require('./package.json').version")"
|
|
test "$TAG" = "$PKG" || { echo "tag $GITHUB_REF_NAME does not match package version $PKG"; exit 1; }
|
|
|
|
- name: Publish to Gitea registry
|
|
working-directory: plugin-kit
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: |
|
|
test -n "$NODE_AUTH_TOKEN" || { echo "REGISTRY_TOKEN secret is empty"; exit 1; }
|
|
printf '//git.unom.io/api/packages/unom/npm/:_authToken=%s\n' "$NODE_AUTH_TOKEN" >> .npmrc
|
|
bun publish
|