[Release] 🌈 v1.0.1 #8
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
name: Build Extension | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
tags: | |
- v* | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
cd sidebar | |
npm install | |
- name: Build project | |
run: | | |
cd sidebar | |
npm run build | |
cd .. | |
rm -r sidebar | |
- name: Package Extension | |
uses: cardinalby/webext-buildtools-pack-extension-dir-action@v1 | |
with: | |
extensionDir: '.' | |
zipFilePath: 'build/extension.zip' | |
zipIgnore: '*.pem|.git|*.crx|.github|sidebar|_metadata|screenshot.png' | |
- name: Sigheck Extension | |
uses: cardinalby/webext-buildtools-chrome-crx-action@v2 | |
with: | |
# zip file made at the packExtensionDir step | |
zipFilePath: 'build/extension.zip' | |
crxFilePath: 'build/extension.crx' | |
privateKey: ${{ secrets.CHROME_CRX_PRIVATE_KEY }} | |
- name: Upload Extension | |
uses: actions/upload-artifact@v4 | |
with: | |
name: extension | |
path: build/extension.zip | |
- name: Upload CRX | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crx | |
path: build/extension.crx | |
- name: Create Release and Upload Release Asset | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
build/extension.zip | |
build/extension.crx |