generated from fregante/browser-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yevhenii Hyzyla
committed
Oct 15, 2023
1 parent
9d3043b
commit d70b856
Showing
1 changed file
with
17 additions
and
26 deletions.
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
- 'v*' | ||
|
||
jobs: | ||
build: | ||
publish-chrome: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -18,49 +18,40 @@ jobs: | |
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
# If cache not found, use latest cache instead of having a cache miss | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Archive node_modules | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: node-modules | ||
path: node_modules | ||
|
||
publish-chrome: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download node_modules | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: node-modules | ||
path: node_modules | ||
- name: Package Chrome extension into a zip artifact | ||
- name: Build Chrome extension | ||
run: npm run build:chrome | ||
- name: Chrome Platform Publish | ||
uses: PlasmoHQ/bpp@v3 | ||
with: | ||
keys: ${{ secrets.BPP_CHROME_KEYS }} | ||
chrome-file: build/chrome-mv3-prod.zip | ||
|
||
|
||
|
||
publish-firefox: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download node_modules | ||
uses: actions/download-artifact@v2 | ||
- name: Use Node.js 16.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16.x | ||
- name: Cache npm modules | ||
uses: actions/cache@v2 | ||
with: | ||
name: node-modules | ||
path: node_modules | ||
- name: Package Firefox extension into a zip artifact | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build Firefox extension | ||
run: npm run build:firefox | ||
- name: Firefox Platform Publish | ||
uses: PlasmoHQ/bpp@v3 | ||
with: | ||
keys: ${{ secrets.BPP_FIREFOX_KEYS }} | ||
firefox-file: build/firefox-mv2-prod.zip | ||
firefox-file: build/firefox-mv2-prod.zip |