Skip to content

Latest commit

 

History

History
199 lines (142 loc) · 9.56 KB

releasing.md

File metadata and controls

199 lines (142 loc) · 9.56 KB

Releasing

This guide describes the intended public beta release workflow for git@github.com:HunKonTech/Redacto.git. Public beta releases should be published as GitHub pre-releases before the same reviewed artifact is uploaded manually to the Chrome Web Store.

Release Invariants

  • Keep package.json, package-lock.json, manifest.json, Git tag, release zip name, release checksum, and changelog aligned on the same version.
  • Publish from a curated fresh public history, not this local repository's existing private history.
  • Keep .private-docs/, docs/issues/, local fixtures, generated corpora, and raw build outputs out of the public initial commit.
  • Keep the Chrome Web Store upload manual for the first public beta.
  • Do not publish source maps in the official extension package.
  • Include LICENSE, NOTICE, TERMS.md, and THIRD_PARTY_NOTICES.md in every official release package.
  • Attach the exact Chrome package zip and SHA-256 checksum to the GitHub pre-release.

The official package builder creates the reviewed Chrome Web Store upload artifact from dist/ and writes the checksum that must be attached to the GitHub pre-release.

Prepare The Tree

  1. Confirm the public source boundary:

    git check-ignore .private-docs/public-beta-launch-plan.md dist/manifest.json generated/models/ner/example/manifest.json
    git ls-files .private-docs tests-local dist generated crate/pkg crate/target .model-sources .venv coverage node_modules
    git ls-files docs/issues
  2. Confirm the public repo target is git@github.com:HunKonTech/Redacto.git.

  3. Confirm all public docs use beta wording and avoid guarantees of perfect detection, prevention, or regulatory compliance.

See docs/release/public-source-boundary.md and docs/release/public-initial-commit.md.

Align Version

For each public beta, align:

  • package.json
  • package-lock.json
  • manifest.json
  • CHANGELOG.md
  • release zip name
  • Git tag v<version>
  • GitHub Release title

To set the release version:

npm run version:set -- <version>

Before packaging, verify aligned release metadata:

npm run version:check

After creating the final release tag, require the expected Git tag as part of the final check:

npm run version:check -- --require-tag

The version check validates package.json, package-lock.json, manifest.json, the CHANGELOG.md release heading, release archive/checksum naming when files exist under release/, and the expected Git tag v<version> when --require-tag is passed. Without an explicit version argument, it uses the version from package.json.

Validate

Model-free CI checks:

npm run validate:ci

This path is safe for pull requests and local pre-release checks. It runs Jest, Svelte checks, version alignment, Chrome permission checks, the privacy-boundary scan, Rust tests, and a model-free extension build. It does not download, prepare, or require large model assets. There is no ESLint setup in this tree, so no lint step runs.

Release-strict checks with prepared BardsAI assets:

npm run validate:release-strict

This path runs the same release metadata and privacy-boundary checks, builds the WASM package, and then builds the extension with the model packaged (MODEL_SOURCE=bundled NER_MODEL_ASSETS_REQUIRED=1). It fails if the prepared BardsAI files are missing from generated/models/ner/bardsai-eu-pii-anonimization-multilang/.

Run the manual smoke checklist in docs/release/smoke-test-checklist.md against:

  • chatgpt.com
  • chat.openai.com
  • claude.ai
  • gemini.google.com

Before packaging, review docs/release/chrome-permissions.md and docs/release/privacy-boundary.md. Reuse the permission justifications for the Chrome Web Store listing, and keep the privacy-boundary check green before creating release artifacts.

Legal And License Review

Before publishing a release, confirm the Apache-2.0 redistribution duties:

  • LICENSE, NOTICE, TERMS.md, and THIRD_PARTY_NOTICES.md are present in the repository and in the package dry-run output.
  • Webpack-generated *.LICENSE.txt sidecar files for bundled third-party code remain in dist/ and are not excluded from the release ZIP.
  • Existing copyright, patent, trademark, and attribution notices in third-party source or assets remain intact.
  • If a third-party source file is modified and redistributed, that file carries a prominent change notice naming Redacto as the modifier and describing that the file was changed.
  • Any upstream third-party NOTICE file for redistributed code or model assets is carried forward readably, either as a NOTICE file, source/documentation notice, or customary generated display.
  • The Terms of Use still match the intended release train and the distribution remains free and non-commercial.

Package

After release-strict validation and manual smoke testing are green, create the official Chrome extension package:

npm run package:release

The command:

  • requires a clean Git worktree before building
  • verifies release metadata with version:check
  • requires ONNX Runtime Web assets (the Local AI model is not packaged; the extension downloads it on first use, see docs/developer/model-download.md)
  • runs the WASM release build and the extension build
  • zips only runtime files from dist/
  • requires the legal files LICENSE, NOTICE, TERMS.md, and THIRD_PARTY_NOTICES.md
  • excludes source maps and private/source-only/generated-local paths
  • writes release/redacto-chrome-brave-vivaldi-<version>.zip
  • writes release/redacto-chrome-brave-vivaldi-<version>.sha256 for the exact zip

For local package-content checks against an existing dist/ tree without the clean-worktree guard or build step, run:

npm run package:dry-run

The dry run is not a release artifact. It exists to verify include/exclude behavior while local changes are still in progress.

GitHub Pre-Release

For the public beta:

  1. Create the fresh public initial commit from the curated tree.
  2. Push to git@github.com:HunKonTech/Redacto.git.
  3. Tag the release version, for example v0.3.1.
  4. Create a GitHub Release marked as a pre-release.
  5. Attach the exact Chrome extension zip and checksum.
  6. Link the release notes to CHANGELOG.md, PRIVACY.md, SECURITY.md, and support docs.

Build Versions Of This Fork

Every run of .github/workflows/build-and-release.yml (manual or otherwise) gets its own version and publishes a GitHub release (not a pre-release); no tag has to be pushed first.

  • Version: <BASE_VERSION>.<run number>, e.g. 0.5.0.9. BASE_VERSION is a repository variable (Settings → Secrets and variables → Actions → Variables) holding the upstream version this fork is based on; it stays fixed while the run number grows by one per run. Without the variable, package.json's version is the base.
  • The workflow passes both as PG_BASE_VERSION / PG_BUILD_NUMBER; scripts/build-number.js (ciBuildVersion) turns them into the version of the extension manifests, the Chrome / Edge package names, the web page footer and the release (tag v0.5.0.9 on the built commit).
  • package.json, manifest.json and CHANGELOG.md keep the upstream x.y.z; npm run version:check still checks those.

Chrome Web Store Handoff

Chrome Web Store upload is manual for the first public beta. Upload the same reviewed zip that was attached to the GitHub pre-release. Use the listing copy and permission justifications prepared in the Chrome Web Store launch docs, and link to the GitHub-hosted privacy policy and support material.

Firefox

The Firefox package (redacto-firefox-<version>.zip) is built from the same sources and attached to every GitHub release. The firefox-publish job submits it to addons.mozilla.org on every run when the AMO_JWT_ISSUER / AMO_JWT_SECRET secrets are set; see docs/developer/firefox.md.

Microsoft Edge Add-ons Publishing

The edge-publish job of .github/workflows/build-and-release.yml uploads the Edge package to Microsoft Edge Add-ons through the Add-ons API (v1.1) and submits it for certification. It runs on every push to main (the release job tags the commit v<build version> itself, no tag has to be pushed), on v* tag pushes and on manual runs with the publish_edge input; it is skipped without its secrets.

One-time setup:

  1. Submit the first version by hand in Partner Center (Edge → Overview → Create new extension); the API only updates an existing product.
  2. Partner Center → Edge → Publish API → Create API credentials. Copy the Client ID and API key (the key expires after 72 days; renew it).
  3. The Product ID is the extension's ID in its Partner Center URL.
  4. Add them as repository secrets: EDGE_PRODUCT_ID, EDGE_CLIENT_ID, EDGE_API_KEY (Settings → Secrets and variables → Actions).

Edge rejects a submission while the previous one is still in review; the job then only logs a warning and the workflow stays green. A 404 on the upload means EDGE_PRODUCT_ID is not a product of these API credentials: use the Product ID (a GUID) from the Partner Center URL, not the Store / CRX ID, make sure the first version was submitted by hand, that no earlier submission is still In review, and that the API key comes from the v1.1 Publish API page (Enable the new experience before creating it).

GitHub Release Token

GITHUB_TOKEN cannot create the v<build version> tag on a commit that changes .github/workflows/ (403 "Resource not accessible by integration"). Add a RELEASE_TOKEN secret, a fine-grained PAT for this repository with Contents and Workflows read/write; the release job uses it when set.