-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This reverts commit 006763e.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Submit for Review | ||
This comment has been minimized.
Sorry, something went wrong. |
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dryRun: | ||
default: false | ||
type: boolean | ||
description: Skip submission and perform a dry run | ||
|
||
jobs: | ||
validate: | ||
name: Validate | ||
uses: ./.github/workflows/validate.yml | ||
secrets: inherit | ||
|
||
submit: | ||
name: Submit | ||
runs-on: ubuntu-22.04 | ||
needs: [validate] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.email "github-actions@users.noreply.github.com" | ||
git config user.name "GitHub Actions" | ||
- name: Install dependencies | ||
run: bun install --frozen-lockfile | ||
|
||
- name: Bump Version | ||
id: version | ||
run: | | ||
bunx changelogen@latest --bump | ||
NEW_VERSION=$(bun --print 'require("./package.json").version') | ||
echo "newVersion=$NEW_VERSION" >> "$GITHUB_OUTPUT" | ||
- name: Build and Zip | ||
run: | | ||
bun run zip | ||
bun run zip:firefox | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: .output/*.zip | ||
if-no-files-found: error | ||
include-hidden-files: true | ||
|
||
- name: Submit | ||
run: | | ||
bun wxt submit \ | ||
--chrome-zip .output/*-chrome.zip \ | ||
--firefox-zip .output/*-firefox.zip --firefox-sources-zip .output/*-sources.zip | ||
env: | ||
DRY_RUN: ${{ inputs.dryRun }} | ||
CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }} | ||
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }} | ||
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }} | ||
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }} | ||
FIREFOX_EXTENSION_ID: ${{ secrets.FIREFOX_EXTENSION_ID }} | ||
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }} | ||
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }} | ||
EDGE_PRODUCT_ID: ${{ secrets.EDGE_PRODUCT_ID }} | ||
EDGE_CLIENT_ID: ${{ secrets.EDGE_CLIENT_ID }} | ||
EDGE_CLIENT_SECRET: ${{ secrets.EDGE_CLIENT_SECRET }} | ||
EDGE_ACCESS_TOKEN_URL: ${{ secrets.EDGE_ACCESS_TOKEN_URL }} | ||
|
||
- name: Commit and Push | ||
if: ${{ !inputs.dryRun }} | ||
run: | | ||
git add package.json CHANGELOG.md | ||
git commit -am "chore(release): v$NEW_VERSION" | ||
git tag v$NEW_VERSION | ||
git push | ||
git push --tags | ||
env: | ||
NEW_VERSION: ${{ steps.version.outputs.newVersion }} | ||
|
||
- name: Release | ||
if: ${{ !inputs.dryRun }} | ||
run: pnpx changelogen@latest gh release ${{ steps.version.outputs.newVersion }} --token ${{ github.token }} | ||
|
||
# Don't upload sources zip - it can contain .env files, which may include secrets | ||
- name: Upload ZIPs | ||
if: ${{ !inputs.dryRun }} | ||
run: gh release upload ${{ steps.version.outputs.newVersion }} .output/*-chrome.zip .output/*-firefox.zip |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ dist-* | |
artifacts | ||
coverage | ||
.wxt | ||
dist | ||
.output | ||
coverage | ||
*.lock |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,34 +6,38 @@ | |
"type": "module", | ||
"scripts": { | ||
"check": "check", | ||
"dev": "vite", | ||
"build": "vite build", | ||
"dev": "wxt", | ||
"dev:firefox": "wxt --browser firefox", | ||
This comment has been minimized.
Sorry, something went wrong.
aklinker1
Author
Owner
|
||
"build": "wxt build", | ||
"build:firefox": "wxt build --browser firefox", | ||
"test": "vitest", | ||
"test:coverage": "vitest run --coverage", | ||
"prepare": "simple-git-hooks" | ||
"zip": "wxt zip", | ||
"zip:firefox": "wxt zip -b firefox", | ||
"prepare": "simple-git-hooks", | ||
"postinstall": "wxt prepare" | ||
}, | ||
"dependencies": { | ||
"@aklinker1/check": "^1.4.5", | ||
"@tanstack/vue-query": "^5.59.13", | ||
"@webext-core/messaging": "^2.0.2", | ||
"@webext-core/proxy-service": "^1.2.0", | ||
"@wxt-dev/storage": "^1.1.0", | ||
This comment has been minimized.
Sorry, something went wrong.
aklinker1
Author
Owner
|
||
"async-mutex": "^0.5.0", | ||
"fast-deep-equal": "^3.1.3", | ||
"minimatch": "^10.0.1", | ||
"ofetch": "^1.4.1" | ||
}, | ||
"devDependencies": { | ||
"@aklinker1/generate-changelog": "^1.1.2", | ||
"@crxjs/vite-plugin": "^2.0.0-beta.31", | ||
"@iconify/json": "^2.2.261", | ||
"@tailwindcss/vite": "^4.0.6", | ||
"@types/bun": "^1.1.11", | ||
"@types/chrome": "^0.0.304", | ||
"@types/chrome": "^0.0.278", | ||
"@types/jsdom": "^21.1.7", | ||
"@vitejs/plugin-vue": "^5.2.1", | ||
"@vitest/coverage-v8": "^2.1.3", | ||
"@wxt-dev/auto-icons": "^1.0.2", | ||
"@wxt-dev/i18n": "^0.2.1", | ||
"@wxt-dev/module-vue": "^1.0.1", | ||
"daisyui": "^5.0.0-beta.7", | ||
"env-cmd": "^10.1.0", | ||
"fast-glob": "^3.3.2", | ||
|
@@ -45,10 +49,10 @@ | |
"tailwindcss": "^4.0.6", | ||
"typescript": "^5.6.3", | ||
"unplugin-icons": "^0.19.3", | ||
"vite": "6.0.8", | ||
"vitest": "^2.1.3", | ||
"vue": "^3.5.12", | ||
"vue-tsc": "^2.1.6" | ||
"vue-tsc": "^2.1.6", | ||
"wxt": "^0.19.11" | ||
}, | ||
"simple-git-hooks": { | ||
"pre-commit": "bun lint-staged" | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
import { i18n } from "@/utils/i18n"; | ||
This comment has been minimized.
Sorry, something went wrong.
aklinker1
Author
Owner
|
||
import { createDiffComponent } from "./createDiffComponent"; | ||
|
||
export const CommitDiff = createDiffComponent({ | ||
getAdditionsElement: () => | ||
document.querySelector<HTMLElement>("#toc>*>strong:nth-child(2)"), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
<script lang="ts" setup> | ||
import { i18n } from "@/utils/i18n"; | ||
defineProps<{ | ||
value: string; | ||
}>(); | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { registerGithubService, createGithubApi } from "@/utils/github"; | ||
|
||
export default defineBackground(() => { | ||
This comment has been minimized.
Sorry, something went wrong.
aklinker1
Author
Owner
|
||
const api = createGithubApi(); | ||
registerGithubService(api); | ||
|
||
browser.runtime.onInstalled.addListener(async ({ reason }) => { | ||
if (reason === "install") { | ||
void browser.runtime.openOptionsPage(); | ||
} | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
export default defineContentScript({ | ||
This comment has been minimized.
Sorry, something went wrong.
aklinker1
Author
Owner
|
||
matches: ["*://*.github.com/*"], | ||
runAt: "document_end", | ||
|
||
main() { | ||
main(); | ||
// TODO: schedule next interval for 1 second AFTER the main function finishes. If the main | ||
// function takes more than 1 second, it might cause problems. | ||
setInterval(main, SECOND); | ||
}, | ||
}); | ||
|
||
function main() { | ||
const repo = getCurrentRepo(); | ||
const owner = getCurrentOwner(); | ||
if (!repo || !owner) return; | ||
|
||
const pr = getCurrentPr(); | ||
if (pr) return replaceCount({ type: "pr", repo, owner, pr }, PrDiff); | ||
|
||
const commitHash = getCurrentRef(); | ||
if (commitHash) | ||
return replaceCount( | ||
{ type: "commit", repo, owner, ref: commitHash }, | ||
CommitDiff, | ||
); | ||
|
||
const commitRefs = getCurrentCompare(); | ||
if (commitRefs) | ||
return replaceCount( | ||
{ type: "compare", repo, owner, commitRefs }, | ||
CompareDiff, | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,9 @@ | |
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<script src="./options.ts" type="module"></script> | ||
This comment has been minimized.
Sorry, something went wrong.
aklinker1
Author
Owner
|
||
<script src="./main.ts" type="module"></script> | ||
<link rel="stylesheet" href="~/assets/tailwind.css" /> | ||
<meta name="manifest.open_in_tab" content="false" /> | ||
This comment has been minimized.
Sorry, something went wrong.
aklinker1
Author
Owner
|
||
</head> | ||
<body class="p-4 gap-4 flex flex-col"></body> | ||
</html> |
1 comment
on commit 39d766d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main thing to recognize is that CRXJS found entrypoints by looking at a manifest.json
file, whereas WXT finds entrypoints by looking for files in the entrypoints
directory.
This is just an example workflow for doing a release with conventional commits. Use it as inspiration for updating your own release process.