Skip to content

Commit

Permalink
Start implementing cd
Browse files Browse the repository at this point in the history
  • Loading branch information
ttoino committed Sep 23, 2023
1 parent 9ac2e31 commit 8d4701c
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: CD

on:
release:
types: ["published"]
pull_request:
branches: [main, develop]

jobs:
build:
name: Build
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn release
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
path: bundle
name: bundle

chrome:
name: Deploy to Chrome
runs-on: ubuntu-latest
needs: build
env:
EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: bundle
- run: ls -R
# - name: Upload to Chrome Web Store
# working-directory: bundle/chrome
# run: npx chrome-webstore-upload-cli upload --auto-publish

edge:
name: Deploy to Edge
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: bundle

firefox:
name: Deploy to Firefox
runs-on: ubuntu-latest
needs: build
env:
API_KEY: ${{ secrets.FIREFOX_API_KEY }}
API_SECRET: ${{ secrets.FIREFOX_API_SECRET }}
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: bundle
# - name: Sign add-on
# working-directory: bundle/firefox
# run: npx web-ext sign --api-key $API_KEY --api-secret $API_SECRET

opera:
name: Deploy to Opera
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: bundle

safari:
name: Deploy to Safari
runs-on: macos-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: bundle

0 comments on commit 8d4701c

Please sign in to comment.