Skip to content

Commit

Permalink
[Opt] 🚀 Simplify Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-zklcdc committed May 11, 2024
1 parent b0bda5e commit e4f4c0e
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
run: |
cd sidebar
npm run build
cd ..
rm -r sidebar
- name: Package Extension
uses: cardinalby/webext-buildtools-pack-extension-dir-action@v1
Expand All @@ -46,37 +48,21 @@ jobs:
privateKey: ${{ secrets.CHROME_CRX_PRIVATE_KEY }}

- name: Upload Extension
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: extension
path: build/extension.zip

- name: Upload CRX
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: crx
path: build/extension.crx

release:
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Download Extension
uses: actions/download-artifact@v2
with:
name: extension
path: build

- name: Download CRX
uses: actions/download-artifact@v2
with:
name: crx
path: build

- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
build/extension.zip
build/extension.crx
build/extension.crx

0 comments on commit e4f4c0e

Please sign in to comment.