Skip to content

Commit

Permalink
feat: bundle and upload zip
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Oct 12, 2023
1 parent 11e88d7 commit c31e383
Show file tree
Hide file tree
Showing 6 changed files with 1,903 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ jobs:
- name: Build
run: pnpm build

- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bundle/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ lerna-debug.log*
node_modules
dist
dist-ssr
dist-firefox-v2
dist-firefox
*.local
bundle

# Editor directories and files
.vscode/*
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
"type": "module",
"scripts": {
"dev": "run-s clean && vite",
"build": "run-s clean && tsc && vite build && run-s firefox-mv2-build",
"firefox-mv2-build": "node tools/unstable_mv3ToMv2Build.js",
"build": "run-s clean && tsc && vite build && run-s build:firefox && run-p bundle:*",
"bundle:chrome": "web-ext build -s dist -a bundle -o -n tiddlywiki-collector-chrome.zip",
"bundle:firefox": "web-ext build -s dist-firefox -a bundle -o -n tiddlywiki-collector-firefox.zip",
"build:firefox": "node scripts/unstable_mv3ToMv2Build.js",
"clean": "run-p clean:*",
"clean:dist": "rimraf dist",
"clean:dist-firefox-v2": "rimraf dist-firefox-v2",
"clean:bundle": "rimraf bundle",
"clean:dist-firefox": "rimraf dist-firefox",
"format": "run-p format:*",
"format:eslint": "run-s \" lint:eslint --fix \"",
"format:dprint": "run-s \" lint:dprint fmt \"",
Expand Down Expand Up @@ -87,7 +90,8 @@
"ts-jest": "^29.1.1",
"tw5-typed": "^0.3.10",
"typescript": "5.2.2",
"vite": "^4.4.11"
"vite": "^4.4.11",
"web-ext": "^7.8.0"
},
"simple-git-hooks": {
"pre-commit": "./node_modules/.bin/nano-staged"
Expand Down
Loading

1 comment on commit c31e383

@linonetwo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it works with v3 with this script sinanbekar/browser-extension-react-typescript-starter#61 (comment) , so I remove the -v2!

Please sign in to comment.