Skip to content

Refactor release workflow to improve dependency caching and streamlin… #67

Refactor release workflow to improve dependency caching and streamlin…

Refactor release workflow to improve dependency caching and streamlin… #67

Workflow file for this run

name: "Submit to Web Store"
on:
push:
branches:
- main
jobs:
build-and-release:
name: Build and Release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "yarn"
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: |
node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies if not cached
run: yarn install --frozen-lockfile
if: steps.cache.outputs.cache-hit != 'true'
- name: Build the extension
run: |
for target in chrome-mv3 firefox-mv3 edge-mv3 opera-mv3 safari-mv3; do
yarn build --target=$target --zip
done
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/chrome-mv3-prod.zip