Skip to content

Commit

Permalink
ci: add publish extension workflow that runs on release publish
Browse files Browse the repository at this point in the history
  • Loading branch information
kethan1 committed Jan 20, 2024
1 parent ca9d498 commit 03f6ed3
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish_extension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build & Publish Extension

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository to the runner
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install NPM Dependencies and Build Extension
run: |
cd extension
npm ci
npm run tailwind-build
npm run webpack-build-prod
mv dist ../Bias-Buster-Extension
cd ../
sudo apt-get install -y zip
zip -r Bias-Buster-Extension.zip Bias-Buster-Extension/*
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: Bias-Buster-Extension.zip

- uses: actions/upload-artifact@v4
with:
name: Bias-Buster-Extension
path: Bias-Buster-Extension.zip

0 comments on commit 03f6ed3

Please sign in to comment.