feat(ci): adding publish workflow to pack extension into a crx file #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
pack-and-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 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: latest | |
release_name: latest | |
draft: false | |
prerelease: false |