diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dba61bf3..ea7bdc01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,13 @@ on: branches: - main workflow_dispatch: + inputs: + republish_tag: + description: >- + Recovery only. Publish an already-tagged version to npm whose publish + step failed (e.g. v0.16.0). Leave blank for a normal release run. + required: false + default: '' permissions: contents: write issues: write @@ -12,7 +19,11 @@ permissions: jobs: release: name: Release - runs-on: ${{ vars.RUN_ON_VPS == 'true' && 'self-hosted' || 'ubuntu-latest' }} + if: inputs.republish_tag == '' + # Must stay GitHub-hosted: npm rejects provenance from self-hosted + # runners (422, only github-hosted are supported), so RUN_ON_VPS + # deliberately does not apply here. + runs-on: ubuntu-latest steps: - name: Mint GitHub App token id: app-token @@ -73,3 +84,50 @@ jobs: - name: Publish to npm (trusted publishing) if: hashFiles('dist/*.tgz') != '' run: npm publish ./dist/*.tgz --provenance --access public + + republish: + name: Republish tag to npm + # Recovery path for a release that tagged and pushed but failed at the npm + # publish step. Lives in this workflow file because npm trusted publishing + # authorizes by workflow filename. + if: inputs.republish_tag != '' + runs-on: ubuntu-latest + steps: + - name: Checkout tag + uses: actions/checkout@v5 + with: + ref: ${{ inputs.republish_tag }} + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: 22 + registry-url: 'https://registry.npmjs.org' + package-manager-cache: false + + - name: Install pnpm + uses: pnpm/action-setup@v6 + + - name: Upgrade npm for trusted publishing + run: npm install -g npm@latest + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm run build + + - name: Verify tag matches package version + run: | + pkg="v$(node -p "require('./package.json').version")" + if [ "$pkg" != "${{ inputs.republish_tag }}" ]; then + echo "::error::package.json is $pkg but tag input is ${{ inputs.republish_tag }}" + exit 1 + fi + + - name: Pack + run: npm pack --pack-destination dist + + - name: Publish to npm (trusted publishing) + run: npm publish ./dist/*.tgz --provenance --access public diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c4b34d0..13cd4ff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# [0.16.0](https://github.com/simoncodes-ca/lingo-tracker/compare/v0.15.0...v0.16.0) (2026-08-31) + + +### Bug Fixes + +* **core:** build domain declarations before core's dts step ([1580002](https://github.com/simoncodes-ca/lingo-tracker/commit/158000259daa5cd6129d854d6576b5ff85db0bb4)) +* **domain:** emit the branch-body brace pair for a Transloco consumer ([#70](https://github.com/simoncodes-ca/lingo-tracker/issues/70)) ([7ac9ea6](https://github.com/simoncodes-ca/lingo-tracker/commit/7ac9ea69b95c6f8b4f8a5abad93dc233060aeb45)) +* **domain:** make Transloco to ICU conversion position-aware ([#67](https://github.com/simoncodes-ca/lingo-tracker/issues/67)) ([d817a3f](https://github.com/simoncodes-ca/lingo-tracker/commit/d817a3fa21c854d779a8d62888fe917e38936bb9)) +* **tsconfig:** repair project references so typecheck actually runs ([d4013ac](https://github.com/simoncodes-ca/lingo-tracker/commit/d4013acd12904ff656e358f4c551150882a05526)) + + +### Features + +* **protected-terms:** protect terms from translation across export, import, API, CLI, and UI ([551481d](https://github.com/simoncodes-ca/lingo-tracker/commit/551481d23602166a6c69223cca5c9d983c40c866)) +* **protected-terms:** store protected terms in a JSON file ([7574514](https://github.com/simoncodes-ca/lingo-tracker/commit/75745141de5458c629ccad5fd18d5a501f20adf8)) + # [0.15.0](https://github.com/simoncodes-ca/lingo-tracker/compare/v0.14.4...v0.15.0) (2026-06-23) diff --git a/package.json b/package.json index 25c0bc76..3d63876b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@simoncodes-ca/lingo-tracker", - "version": "0.15.0", + "version": "0.16.0", "description": "Effortlessly Track, Validate, and Manage Your Translations.", "bin": { "lingo-tracker": "dist/apps/cli/main.cjs",