52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
linter:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: lts/*
|
|
- uses: pnpm/action-setup@v2.1.0
|
|
with:
|
|
version: latest
|
|
- run: pnpm install --ignore-scripts
|
|
- run: pnpm wxt prepare
|
|
- run: pnpm run lint
|
|
- run: pnpm run tsc
|
|
|
|
release:
|
|
needs: linter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
# https://github.com/semantic-release/semantic-release/issues/2636
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: lts/*
|
|
- uses: pnpm/action-setup@v2.1.0
|
|
with:
|
|
version: latest
|
|
- run: pnpm install --ignore-scripts
|
|
- run: pnpm wxt prepare
|
|
- run: pnpm semantic-release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.WEB_CHAT_GITHUB_TOKEN }}
|
|
- run: |
|
|
pnpm wxt submit --dry-run \
|
|
--chrome-zip .output/*-chrome.zip
|
|
env:
|
|
CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
|
|
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
|
|
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
|
|
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
|