From 28d736f62707607d540e495608eccb2ffe98993c Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 8 Nov 2026 12:31:32 -0500 Subject: [PATCH] chore: push to VS Marketplace on semver tag --- .gitea/workflows/publish.yaml | 42 +++++++++++++++++++++++++++++++++++ .vscodeignore | 1 + CHANGELOG.md | 17 ++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 .gitea/workflows/publish.yaml diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml new file mode 100644 index 0000000..413f8c8 --- /dev/null +++ b/.gitea/workflows/publish.yaml @@ -0,0 +1,42 @@ +name: Publish to VS Marketplace + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '24' + + - name: Verify tag matches package.json version + env: + TAG_REF: ${{ gitea.ref_name }} + run: | + tag="${TAG_REF#v}" + pkg="$(node -p "require('./package.json').version")" + echo "Tag version: $tag" + echo "package.json version: $pkg" + if [ "$tag" != "$pkg" ]; then + echo "::error::Tag v$tag does not match package.json version $pkg" + exit 1 + fi + + - name: Install dependencies + run: npm ci + + - name: Type-check, lint, and bundle + run: npm run package + + - name: Publish to VS Marketplace + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }} + run: npx vsce publish -p "$VSCE_PAT" --skip-duplicate diff --git a/.vscodeignore b/.vscodeignore index 0b8e938..0aee5df 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,5 +1,6 @@ .vscode/** .vscode-test/** +.gitea/** out/** node_modules/** src/** diff --git a/CHANGELOG.md b/CHANGELOG.md index 35665f1..78b95d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added + +- Gitea Actions workflow (`.gitea/workflows/publish.yaml`) that publishes to + the VS Code Marketplace when a `vX.Y.Z` tag is pushed. It fails if the tag + disagrees with the `version` in package.json, runs the existing + `npm run package` gate (type-check, lint, production bundle) before + publishing, and passes `--skip-duplicate` so a re-run is a no-op rather + than a failure. Requires repository Actions to be enabled and a + `VSCE_PAT` repository secret. + +### Fixed + +- Excluded `.gitea/**` from the packaged extension in `.vscodeignore`, so + workflow files are no longer bundled into the VSIX. + ## [0.4.1] - 2026-11-08 ### Fixed