-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added build and release github actions
- Loading branch information
Showing
4 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'Build Chrome extension' | ||
description: 'Builds the chrome extension into a ZIP' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install packages | ||
run: npm ci | ||
working-directory: apps/extension | ||
shell: bash | ||
|
||
- name: Build extension | ||
run: npm run build | ||
working-directory: apps/extension | ||
shell: bash | ||
|
||
- name: Pack extension | ||
working-directory: apps/extension/dist | ||
run: zip -r ../../extension-${{ github.event.pull_request.head.sha }}.zip * | ||
shell: bash | ||
|
||
- name: Upload extension archive | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: extension-${{ github.sha }} | ||
path: apps/extension/extension-${{ github.event.pull_request.head.sha }}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build-extension: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/buildextension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Upload to Web Store | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
build-extension: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/buildextension | ||
|
||
upload-extension: | ||
runs-on: ubuntu-latest | ||
needs: build-extension | ||
steps: | ||
- name: Download extension archive | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: extension-${{ github.sha }} | ||
|
||
- name: Upload to webstore | ||
uses: ExtensionNinja/extension-publish@main | ||
with: | ||
action: upload | ||
extensionID: INSERT_YOUR_EXTENSION_ID | ||
clientID: ${{ secrets.GOOGLE_CLIENT_ID }} | ||
clientSecret: ${{ secrets.GOOGLE_CLIENT_SECRET }} | ||
clientRefreshToken: ${{ secrets.GOOGLE_REFRESH_TOKEN }} | ||
extensionFile: apps/extension/extension-${{ github.event.pull_request.head.sha }}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ | |
"typescript": "^5.2.2", | ||
"vite": "^5.1.4" | ||
} | ||
} | ||
} |