diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 1ef3843..4d8d078 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -4,6 +4,15 @@ on: push: branches: [main] workflow_dispatch: + inputs: + tag: + description: >- + Release tag to publish (e.g. v1.5.1). Only needed to manually + (re)run the publish job for a release that already exists — e.g. + after a packaging fix, when the tag itself predates the fix. + Leave blank for a normal run. + required: false + type: string permissions: contents: write @@ -29,7 +38,7 @@ jobs: # workflow would silently never run. publish: needs: release-please - if: ${{ needs.release-please.outputs.release_created == 'true' }} + if: ${{ needs.release-please.outputs.release_created == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '') }} runs-on: ubuntu-latest permissions: contents: write @@ -37,10 +46,28 @@ jobs: VS_MARKETPLACE_TOKEN: ${{ secrets.VS_MARKETPLACE_TOKEN }} OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }} steps: + # On a normal run, release-please just created the release and handed us its tag/upload_url + # directly. On a manual re-run (release already exists, e.g. retrying after a packaging fix), + # those outputs are empty, so look the release up by the tag the user supplied instead. + - name: Resolve release tag and upload URL + id: resolve + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if [ "${{ needs.release-please.outputs.release_created }}" = "true" ]; then + echo "tag=${{ needs.release-please.outputs.tag_name }}" >> "$GITHUB_OUTPUT" + echo "upload_url=${{ needs.release-please.outputs.upload_url }}" >> "$GITHUB_OUTPUT" + else + TAG="${{ github.event.inputs.tag }}" + UPLOAD_URL=$(gh api "repos/${{ github.repository }}/releases/tags/${TAG}" --jq '.upload_url') + echo "tag=${TAG}" >> "$GITHUB_OUTPUT" + echo "upload_url=${UPLOAD_URL}" >> "$GITHUB_OUTPUT" + fi + - name: Checkout release tag uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: - ref: ${{ needs.release-please.outputs.tag_name }} + ref: ${{ steps.resolve.outputs.tag }} - name: Setup Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 @@ -68,10 +95,15 @@ jobs: # # Lets users grab the .vsix straight from the GitHub Release and "Install from VSIX...", # no Marketplace/Open VSX account or token needed for this path. + # + # Only meaningful right after release-please creates the (draft) release. On a manual + # re-run the release is already published and non-draft, so attaching again would just + # 422 on the duplicate asset name — skip both steps in that case. - name: Attach VSIX to GitHub Release + if: ${{ needs.release-please.outputs.release_created == 'true' }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - UPLOAD_URL: ${{ needs.release-please.outputs.upload_url }} + UPLOAD_URL: ${{ steps.resolve.outputs.upload_url }} run: | VSIX_FILE=$(ls *.vsix) BASE_URL="${UPLOAD_URL%%\{*}" @@ -82,9 +114,10 @@ jobs: "${BASE_URL}?name=${VSIX_FILE}" - name: Publish GitHub Release + if: ${{ needs.release-please.outputs.release_created == 'true' }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - UPLOAD_URL: ${{ needs.release-please.outputs.upload_url }} + UPLOAD_URL: ${{ steps.resolve.outputs.upload_url }} run: | RELEASE_ID=$(echo "${UPLOAD_URL}" | sed -E 's#.*/releases/([0-9]+)/.*#\1#') gh api -X PATCH "repos/${{ github.repository }}/releases/${RELEASE_ID}" -f draft=false diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dd8fde7..453ca4c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.5.0" + ".": "1.5.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a09da..df62f18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [1.5.2](https://github.com/Wikid82/Workspace-File-Bookmarks/compare/workspace-file-bookmarks-v1.5.1...workspace-file-bookmarks-v1.5.2) (2026-08-20) + + +### Bug Fixes + +* **ci:** allow manual re-run of publish job for existing releases ([ba6719d](https://github.com/Wikid82/Workspace-File-Bookmarks/commit/ba6719d230139f9ffd611d057ad70ea25ff3a336)) + +## [1.5.1](https://github.com/Wikid82/Workspace-File-Bookmarks/compare/workspace-file-bookmarks-v1.5.0...workspace-file-bookmarks-v1.5.1) (2026-08-20) + + +### Bug Fixes + +* derive pre-release version from live registry state, not local package.json ([92cb0ea](https://github.com/Wikid82/Workspace-File-Bookmarks/commit/92cb0ea51b7bf383b8d1b292a04e78a750dd86ee)) +* update ansi-regex version to 6.3.0 ([253850d](https://github.com/Wikid82/Workspace-File-Bookmarks/commit/253850d6faba8cfeb3f00b201c89994d2a51dd4c)) +* update TypeScript and @types/node versions; adjust tsconfig module settings ([7c30fff](https://github.com/Wikid82/Workspace-File-Bookmarks/commit/7c30fff555f1b2659578555f92cfdff7508234b8)) +* update typescript version to ~7.0.0 ([32f6cfb](https://github.com/Wikid82/Workspace-File-Bookmarks/commit/32f6cfbebe8dd4ca11989b02dea992f1967f62a3)) + ## [1.5.0](https://github.com/Wikid82/Workspace-File-Bookmarks/compare/workspace-file-bookmarks-v1.4.3...workspace-file-bookmarks-v1.5.0) (2026-08-11) diff --git a/package-lock.json b/package-lock.json index 7ba4c70..343c9c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "workspace-file-bookmarks", - "version": "1.5.0", + "version": "1.5.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "workspace-file-bookmarks", - "version": "1.5.0", + "version": "1.5.2", "devDependencies": { "@types/node": "^26.2.0", "@types/vscode": "^1.134.0", @@ -15,7 +15,7 @@ "typescript": "~6.0.3" }, "engines": { - "vscode": "^1.133.0" + "vscode": "^1.134.0" } }, "node_modules/@azu/format-text": { diff --git a/package.json b/package.json index 532af70..f2beadd 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Bookmark files across multi-repo VS Code workspaces for quick access.", "publisher": "Wikid82", "private": false, - "version": "1.5.0", + "version": "1.5.2", "icon": "media/icon.png", "categories": [ "Other" @@ -32,7 +32,7 @@ }, "homepage": "https://github.com/Wikid82/Workspace-File-Bookmarks#readme", "engines": { - "vscode": "^1.133.0" + "vscode": "^1.134.0" }, "activationEvents": [], "main": "./dist/extension.cjs", diff --git a/scripts/wfb_dep_update.sh b/scripts/wfb_dep_update.sh index 3bf71e9..95cec09 100755 --- a/scripts/wfb_dep_update.sh +++ b/scripts/wfb_dep_update.sh @@ -48,6 +48,19 @@ for MODULE in "${NPM_MODULES[@]}"; do # support yet, which crashes `npm run lint`. Keep pinned to ^9 until # eslint-config-next ships a compatible eslint-plugin-react. npx --yes npm-check-updates -u --reject "typescript,@typescript-eslint/*" + + # ncu only touches dependency ranges, not engines.vscode, so keep the + # minimum supported VS Code version in lockstep with @types/vscode here. + # vsce refuses to package when engines.vscode is behind @types/vscode. + node -e ' + const fs = require("fs"); + const pkg = JSON.parse(fs.readFileSync("package.json", "utf8")); + const typesVersion = pkg.devDependencies?.["@types/vscode"]?.replace(/^[^0-9]*/, ""); + if (typesVersion && pkg.engines?.vscode) { + pkg.engines.vscode = `^${typesVersion}`; + fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2) + "\n"); + } + ' rm -rf node_modules package-lock.json npm install --legacy-peer-deps npm dedupe --legacy-peer-deps