Skip to content

Commit

Permalink
feat(ci): adding publish workflow to pack extension into a crx file
Browse files Browse the repository at this point in the history
  • Loading branch information
gnugomez committed Dec 1, 2023
1 parent 310b073 commit 2d82e4b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Build and Test

on:
push:
branches:
- main
workflow_call:
pull_request:
branches:
- main
Expand Down Expand Up @@ -33,4 +31,10 @@ jobs:
run: pnpm lint

- name: Build
run: pnpm build
run: pnpm build

- name: Output artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Workflow

on:
push:
branches:
- main

jobs:
build:
uses: ./.github/workflows/build.yml
with:
publish: true

publish:
needs: build
runs-on: ubuntu-latest

steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: dist
path: dist/

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 16

- name: Install npm crx
run: npm install -g crx

- name: Create Extension
run: crx pack dist/

- name: Publish Extension
uses: actions/upload-artifact@v2
with:
name: sync-video-rtc
path: sync-video-rtc.crx

0 comments on commit 2d82e4b

Please sign in to comment.