diff --git a/.changeset/fix-windows-staging-path.md b/.changeset/fix-windows-staging-path.md new file mode 100644 index 0000000..e634730 --- /dev/null +++ b/.changeset/fix-windows-staging-path.md @@ -0,0 +1,5 @@ +--- +'@systemfsoftware/claude-code-comment-checker': patch +--- + +Fix Windows artifact upload path and execute full release pipeline. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 707a5e0..be5c632 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,24 +106,24 @@ jobs: run: ./scripts/tools/run-binary-smoke.ts --target ${{ matrix.target }} --bin-dir target/${{ matrix.target }}/release - name: Stage platform package - run: ./scripts/tools/stage-platform-package.ts --target ${{ matrix.target }} --suffix ${{ matrix.suffix }} --stage ${{ runner.temp }}/platform-${{ matrix.suffix }} --bin-dir target/${{ matrix.target }}/release + run: ./scripts/tools/stage-platform-package.ts --target ${{ matrix.target }} --suffix ${{ matrix.suffix }} --stage dist/staging/platform-${{ matrix.suffix }} --bin-dir target/${{ matrix.target }}/release - name: Bundle tarball - run: ./scripts/tools/bundle-release-tarball.ts --target ${{ matrix.target }} --bin-dir target/${{ matrix.target }}/release --out-dir ${{ runner.temp }}/release-tarball-${{ matrix.suffix }} + run: ./scripts/tools/bundle-release-tarball.ts --target ${{ matrix.target }} --bin-dir target/${{ matrix.target }}/release --out-dir dist/release-tarball-${{ matrix.suffix }} - name: Upload artifacts uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: release-${{ matrix.suffix }} path: | - ${{ runner.temp }}/release-tarball-${{ matrix.suffix }}/comment-checker-${{ matrix.target }}.tar.gz - ${{ runner.temp }}/platform-${{ matrix.suffix }}/binarySha256 + dist/release-tarball-${{ matrix.suffix }}/comment-checker-${{ matrix.target }}.tar.gz + dist/staging/platform-${{ matrix.suffix }}/binarySha256 - name: Upload staged platform package uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: platform-stage-${{ matrix.suffix }} - path: ${{ runner.temp }}/platform-${{ matrix.suffix }} + path: dist/staging/platform-${{ matrix.suffix }} if-no-files-found: error publish: diff --git a/scripts/tools/bundle-release-tarball.ts b/scripts/tools/bundle-release-tarball.ts index 7e59219..d818a8b 100755 --- a/scripts/tools/bundle-release-tarball.ts +++ b/scripts/tools/bundle-release-tarball.ts @@ -1,7 +1,7 @@ #!/usr/bin/env -S deno run --allow-run=tar --allow-read --allow-write --allow-env import { parseArgs } from '@std/cli/parse-args' -import { join } from '@std/path' +import { join, resolve } from '@std/path' import { type Target, TARGETS_PATH } from '../lib/shared.ts' const flags = parseArgs(Deno.args, { @@ -27,7 +27,9 @@ if (!row) { } await Deno.mkdir(outDir, { recursive: true }) -const tarPath = join(outDir, `comment-checker-${targetName}.tar.gz`) +// tar runs with cwd=binDir, so the archive path must be absolute: a relative +// one would resolve against binDir instead of the invocation directory. +const tarPath = join(resolve(outDir), `comment-checker-${targetName}.tar.gz`) const tarCmd = new Deno.Command('tar', { args: ['-czf', tarPath, row.bin],