Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ name: Release Extension

on:
push:
branches:
- main
tags:
- 'v*'
paths:
- package.json
- extension/manifest.json
- .github/workflows/release.yml
workflow_dispatch:
inputs:
version:
description: 'Version to release (example: v1.2.3)'
required: true
required: false
type: string

permissions:
Expand Down Expand Up @@ -40,10 +46,20 @@ jobs:
id: meta
shell: bash
run: |
PACKAGE_VERSION="$(node -p "JSON.parse(require('fs').readFileSync('package.json', 'utf8')).version")"
MANIFEST_VERSION="$(node -p "JSON.parse(require('fs').readFileSync('extension/manifest.json', 'utf8')).version")"

if [[ "$PACKAGE_VERSION" != "$MANIFEST_VERSION" ]]; then
echo "package.json version ($PACKAGE_VERSION) does not match extension/manifest.json version ($MANIFEST_VERSION)" >&2
exit 1
fi

if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
TAG="${GITHUB_REF_NAME}"
else
elif [[ -n "${{ inputs.version }}" ]]; then
TAG="${{ inputs.version }}"
else
TAG="v${MANIFEST_VERSION}"
fi

if [[ ! "$TAG" =~ ^v ]]; then
Expand Down Expand Up @@ -79,6 +95,7 @@ jobs:
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.meta.outputs.tag }}
target_commitish: ${{ github.sha }}
name: Vibe Code Detector ${{ steps.meta.outputs.version }}
generate_release_notes: true
body: |
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ npm run build # Build the Chrome extension into extension/
npm run lint # Run ESLint
```

CI runs on every push via GitHub Actions. Releases can be published either by:
CI runs on every push via GitHub Actions. Releases can be published by:

- bumping `extension/manifest.json` and `package.json` versions on `main` (the workflow automatically creates/updates the matching `vX.Y.Z` GitHub release),
- pushing a version tag (`v*.*.*`), or
- manually triggering the **Release Extension** workflow with a version input.
- manually triggering the **Release Extension** workflow with an optional version input.

Published GitHub releases include the packaged extension zip and checksum, while the recommended user install path remains the Chrome Web Store listing:

Expand Down
Loading