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
5 changes: 5 additions & 0 deletions .github/amo-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": {
"approval_notes": "Build from the submitted source archive with Node.js 22 and npm: run npm ci, then npm run build from the project root. The Firefox extension output is dist/. No credentials or environment variables are required. To test, right-click a link or page and choose Bag It, then use the toolbar popup's Save open tabs action with an existing folder or a new subfolder. Repeat with duplicate prevention enabled; duplicates should be skipped only within the destination folder. Tabs remain open. Bookmark data and settings are stored locally; the extension has no analytics or developer-operated backend."
}
}
37 changes: 33 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
channel:
description: 'Release Channel (unlisted for direct .xpi download, listed for public store)'
required: true
default: 'unlisted'
default: 'listed'
type: choice
options:
- unlisted
Expand All @@ -29,6 +29,8 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -67,20 +69,46 @@ jobs:
- name: Build Extension
run: npm run build

- name: Package Reviewer Source
run: git ls-files | zip -q reviewer-source.zip -@

- name: Prepare AMO Release Notes
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
BASE_TAG=$(git describe --tags --abbrev=0 "${GITHUB_SHA}^" 2>/dev/null || true)
else
BASE_TAG=$(git describe --tags --abbrev=0 "${GITHUB_SHA}" 2>/dev/null || true)
fi
if [ -n "$BASE_TAG" ]; then
git log --no-merges --format='- %s' "$BASE_TAG..$GITHUB_SHA" > release-notes.txt
else
echo "BagMark ${{ steps.versioning.outputs.version }} release." > release-notes.txt
fi
node --input-type=module -e '
import fs from "node:fs";
const metadata = JSON.parse(fs.readFileSync(".github/amo-metadata.json", "utf8"));
metadata.version.release_notes = { "en-US": fs.readFileSync("release-notes.txt", "utf8").trim() };
fs.writeFileSync("amo-metadata.json", JSON.stringify(metadata));
'

- name: Sign Extension via Mozilla Add-ons (AMO)
id: sign
run: |
CHANNEL="${{ github.event.inputs.channel || 'unlisted' }}"
CHANNEL="${{ github.event.inputs.channel || 'listed' }}"
echo "Signing channel: $CHANNEL"
npx web-ext sign \
npx --yes web-ext@10.5.0 sign \
--source-dir dist \
--artifacts-dir signed-artifacts \
--api-key "${{ secrets.AMO_JWT_ISSUER }}" \
--api-secret "${{ secrets.AMO_JWT_SECRET }}" \
--upload-source-code reviewer-source.zip \
--amo-metadata amo-metadata.json \
--approval-timeout 0 \
--channel "$CHANNEL"

- name: Upload Signed Artifact to Actions
uses: actions/upload-artifact@v4
if: github.event.inputs.channel == 'unlisted'
with:
name: bagmark-v${{ steps.versioning.outputs.version }}-signed
path: signed-artifacts/*
Expand All @@ -89,6 +117,7 @@ jobs:
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: signed-artifacts/*
name: "BagMark v${{ steps.versioning.outputs.version }}"
generate_release_notes: true
files: signed-artifacts/*
fail_on_unmatched_files: false
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ npm run package
```
The resulting zip will be created in `web-ext-artifacts/`.

### Mozilla Reviewer Build Instructions

The source archive contains the original TypeScript, assets, build configuration, and npm lockfile. On Linux, macOS, or Windows, install Node.js 22 with its bundled npm, extract the archive, and run from its root:

```bash
npm ci
npm run build
```

The Firefox extension is generated in `dist/`. No credentials, environment variables, external services, or private dependencies are needed to reproduce this build. The release workflow uploads the source archive to Mozilla with the extension, for both listed and unlisted submissions.

### 🚀 Automated Releases & Mozilla AMO Signing
This repository is configured with a GitHub Actions workflow that automatically builds, tests, signs with Mozilla AMO, and publishes a GitHub Release when a git tag is pushed:

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "BagMark - Advanced Bookmarks",
"version": "1.1.0",
"version": "1.1.1",
"description": "Right-click to save bookmarks to custom or date-based folders with rich metadata.",
"permissions": [
"bookmarks",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bag-bookmark",
"version": "1.1.0",
"version": "1.1.1",
"description": "Advanced bookmark extension for Firefox, Chrome, and Brave with date tracking, custom folders, and context menu quick-save",
"type": "module",
"scripts": {
Expand Down
Loading