Skip to content

Commit ab6d131

Browse files
committed
feat: 更新支持发布到 chrome
1 parent d3c4d01 commit ab6d131

File tree

8 files changed

+62
-488
lines changed

8 files changed

+62
-488
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches: [ main, develop ]
5+
branches: [ main ]
66
pull_request:
7-
branches: [ main, develop ]
7+
branches: [ main ]
88
workflow_dispatch:
99

1010
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
@@ -26,12 +26,7 @@ jobs:
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@v4
29-
30-
- name: Setup Python
31-
uses: actions/setup-python@v4
32-
with:
33-
python-version: '3.x'
34-
29+
3530
- name: Setup Just
3631
uses: extractions/setup-just@v3
3732

@@ -44,7 +39,7 @@ jobs:
4439
# Copy standalone build to pages directory
4540
mkdir -p pages
4641
cp -r dist/standalone/* pages/
47-
42+
4843
# Ensure index.html exists
4944
if [ ! -f pages/index.html ]; then
5045
cp pages/standalone.html pages/index.html
@@ -65,7 +60,7 @@ jobs:
6560
url: ${{ steps.deployment.outputs.page_url }}
6661
runs-on: ubuntu-latest
6762
needs: build
68-
if: github.ref == 'refs/heads/develop'
63+
if: github.ref == 'refs/heads/main'
6964
steps:
7065
- name: Deploy to GitHub Pages
7166
id: deployment

.github/workflows/release.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
1515

16-
- name: Setup Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.x'
20-
2116
- name: Setup Just
2217
uses: extractions/setup-just@v3
2318

@@ -56,18 +51,24 @@ jobs:
5651
echo "### 📦 Installation" >> $GITHUB_OUTPUT
5752
echo "" >> $GITHUB_OUTPUT
5853
echo "#### Chrome Extension" >> $GITHUB_OUTPUT
54+
echo "**🌟 Recommended**: [Install from Chrome Web Store](https://chromewebstore.google.com/detail/${{ vars.CHROME_EXTENSION_ID }})" >> $GITHUB_OUTPUT
55+
echo "" >> $GITHUB_OUTPUT
56+
echo "**Manual Installation**:" >> $GITHUB_OUTPUT
5957
echo "1. Download \`json-format-converter-extension-v${{ steps.get_version.outputs.VERSION }}.zip\`" >> $GITHUB_OUTPUT
6058
echo "2. Extract the ZIP file" >> $GITHUB_OUTPUT
6159
echo "3. Open Chrome and navigate to \`chrome://extensions/\`" >> $GITHUB_OUTPUT
6260
echo "4. Enable \"Developer mode\" in the top right" >> $GITHUB_OUTPUT
6361
echo "5. Click \"Load unpacked\" and select the extracted folder" >> $GITHUB_OUTPUT
6462
echo "" >> $GITHUB_OUTPUT
6563
echo "#### Standalone Web App" >> $GITHUB_OUTPUT
64+
echo "**🌟 Online**: [https://idev-sig.github.io/json-format-converter/](https://idev-sig.github.io/json-format-converter/)" >> $GITHUB_OUTPUT
65+
echo "" >> $GITHUB_OUTPUT
66+
echo "**Download**:" >> $GITHUB_OUTPUT
6667
echo "1. Download \`json-format-converter-standalone-v${{ steps.get_version.outputs.VERSION }}.zip\`" >> $GITHUB_OUTPUT
6768
echo "2. Extract to your web server or open \`index.html\` locally" >> $GITHUB_OUTPUT
6869
echo "" >> $GITHUB_OUTPUT
6970
echo "### 🔧 Technical Information" >> $GITHUB_OUTPUT
70-
echo "- Python: 3.x" >> $GITHUB_OUTPUT
71+
echo "- Extension ID: \`${{ vars.CHROME_EXTENSION_ID }}\`" >> $GITHUB_OUTPUT
7172
echo "- Manifest Version: 3" >> $GITHUB_OUTPUT
7273
echo "- Build Time: $(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_OUTPUT
7374
echo "- License: Apache 2.0" >> $GITHUB_OUTPUT
@@ -111,14 +112,14 @@ jobs:
111112

112113
# Optional: Publish to Chrome Web Store (requires setup of secrets)
113114
# Uncomment and configure the following steps if you want to auto-publish to Chrome Web Store
114-
# - name: Publish to Chrome Web Store
115-
# uses: puzzlers-labs/chrome-webstore-publish@v1
116-
# with:
117-
# mode: publish
118-
# extension_id: ${{ vars.CHROME_EXTENSION_ID }}
119-
# zip_file_path: ./json-format-converter-extension.zip
120-
# client_id: ${{ secrets.GOOGLE_CLIENT_ID }}
121-
# client_secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}
122-
# refresh_token: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
123-
# publish_target: public
124-
# expedited_review: true
115+
- name: Publish to Chrome Web Store
116+
uses: puzzlers-labs/chrome-webstore-publish@v1
117+
with:
118+
mode: publish
119+
extension_id: ${{ vars.CHROME_EXTENSION_ID }}
120+
zip_file_path: ./json-format-converter-extension.zip
121+
client_id: ${{ secrets.GOOGLE_CLIENT_ID }}
122+
client_secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}
123+
refresh_token: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
124+
publish_target: public
125+
expedited_review: true

CHROME_STORE.md

Lines changed: 0 additions & 181 deletions
This file was deleted.

PRIVACY_POLICY.md

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)