Skip to content

Add missing peer dependencies #128

Add missing peer dependencies

Add missing peer dependencies #128

Workflow file for this run

name: CI
on:
push:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/node
- run: pnpm run lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/node
- run: pnpm run build
- name: Log run number, attempt and id
run: |
echo "Run number: ${{ github.run_number }}"
- name: Update manifest.json version
run: |
GIT_HASH=$(git rev-parse --short HEAD)
jq --arg version "1.0.${{ github.run_number }}" \
--arg version_name "1.0.${{ github.run_number }}-$GIT_HASH" \
'.version = $version | .version_name = $version_name' \
dist/manifest.json > tmp_manifest.json && \
mv tmp_manifest.json dist/manifest.json
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist
- name: Upload build artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./dist
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/node
- run: pnpm test
deploy-pages:
if: github.ref == 'refs/heads/main'
needs: [build, test]
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
deploy-chrome-store:
if: github.ref == 'refs/heads/main'
needs: [build, test]
environment:
name: chrome-store
url: https://chrome.google.com/webstore/detail/motivation/${{ vars.CHROME_EXTENSION_ID }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: ./dist
- run: cd dist && zip -r ../dist.zip .
- uses: mnao305/[email protected]
with:
file-path: ./dist.zip
extension-id: ${{ vars.CHROME_EXTENSION_ID }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
publish: false
deploy-firefox-store:
if: github.ref == 'refs/heads/main'
needs: [build, test]
environment:
name: firefox-store
url: https://addons.mozilla.org/en-US/firefox/addon/${{ vars.FIREFOX_EXTENSION_ID }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: ./dist
- run: cd dist && zip -r ../dist.zip .
- uses: maoserr/[email protected]
with:
firefox_extension_id: ${{ vars.FIREFOX_EXTENSION_ID }}
api_key: ${{ secrets.FIREFOX_ISSUER }}
api_secret: ${{ secrets.FIREFOX_SECRET }}
file: ./dist.zip