From c86bf3701e2942e6b87277efa9ef991bb16c7f9c Mon Sep 17 00:00:00 2001 From: DEVARAJ K Date: Fri, 28 Aug 2026 20:55:37 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20release=20workflow=20=E2=80=94=20tag=20pu?= =?UTF-8?q?sh=20publishes=20a=20zip=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shipping becomes one command: tag vX.Y.Z and push the tag. The workflow verifies the tag matches the manifest version, runs the full CI gate, zips dist/, and publishes a GitHub Release with the zip attached and auto-generated notes. README install section now offers the release zip as the no-build-tools path. --- .github/workflows/release.yml | 47 +++++++++++++++++++++++++++++++++++ README.md | 14 +++++++++-- 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d35f49c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release + +# Shipping is one command: tag a version and push the tag. +# git tag v0.1.1 && git push origin v0.1.1 +# This builds the extension, zips dist/, and publishes a GitHub Release +# with the zip attached and auto-generated notes. +on: + push: + tags: ['v*'] + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - run: npm ci + + - name: Verify tag matches manifest version + run: | + V=$(node -p "require('./public/manifest.json').version") + if [ "v$V" != "$GITHUB_REF_NAME" ]; then + echo "Tag $GITHUB_REF_NAME does not match manifest version v$V" >&2 + exit 1 + fi + + - name: Typecheck, test, build + run: npm run ci + + - name: Package unpacked extension + run: | + cd dist + zip -r "../ration-${GITHUB_REF_NAME}.zip" . + + - name: Publish GitHub release + uses: softprops/action-gh-release@v2 + with: + files: ration-*.zip + generate_release_notes: true diff --git a/README.md b/README.md index 9d5683a..1f9bf5c 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,16 @@ dashboards already live. Adding a provider is designed to be a single-file contribution — see [CONTRIBUTING.md](CONTRIBUTING.md). -## Install (unpacked, v0.1) +## Install + +**Option A — from a release (no build tools needed):** + +1. Download `ration-vX.Y.Z.zip` from the + [latest release](https://github.com/devudilip/ration/releases/latest) + and unzip it. +2. Follow the browser steps below, selecting the unzipped folder. + +**Option B — build from source:** ```sh git clone https://github.com/devudilip/ration.git @@ -46,7 +55,8 @@ npm run build Then in Chrome (or any Chromium browser): 1. Open `chrome://extensions`, enable **Developer mode**. -2. **Load unpacked** → select the `dist/` folder. +2. **Load unpacked** → select the `dist/` folder (or the unzipped release + folder). 3. Click the Ration icon and toggle on the providers you use. Each toggle asks for permission to that provider's site only, at that moment. 4. You must be logged into the provider's site in this browser — Ration