chore: edit yml #2
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: Upload to Chrome Web Store | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
- name: Install npm packages | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Zip | |
run: zip -r dist.zip extension/prod/ | |
- name: Upload to Chrome Web Store | |
uses: mnao305/chrome-extension-upload@v5.0.0 | |
with: | |
file-path: dist.zip | |
extension-id: ${{ secrets.EXTENSION_ID }} | |
client-id: ${{ secrets.CLIENT_ID }} | |
client-secret: ${{ secrets.CLIENT_SECRET }} | |
refresh-token: ${{ secrets.REFRESH_TOKEN }} | |
publish: false | |
- name: Notify on failure | |
if: failure() | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
server_address: smtp.gmail.com | |
server_port: 465 | |
username: ${{ secrets.EMAIL_USERNAME }} | |
password: ${{ secrets.EMAIL_PASSWORD }} | |
subject: GitHub Actions - ${{ github.workflow }} - ${{ github.event_name }} | |
to: dialaegwuchukwu@gmail.com | |
from: ${{ secrets.EMAIL_USERNAME }} | |
body: | | |
The GitHub Actions workflow has failed. | |
Repository: ${{ github.repository }} | |
Branch: ${{ github.ref }} | |
Commit Message: ${{ github.event.head_commit.message }} | |
Author: ${{ github.event.head_commit.author.name }} | |
debug: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Echo Debug Message | |
run: echo "This is a debug message to confirm the workflow is triggered." |