Merge pull request #20 from IbrahimMohammed47/notification #10
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: Chrome Extension CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
name: Upload extension | |
runs-on: ubuntu-latest | |
# env: | |
# EXTENSION_ID: ${{ env.EXTENSION_ID }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install webstore cli | |
run: |- | |
npm install -g chrome-webstore-upload-cli | |
- name: Extract manifest version | |
run: | | |
MANIFEST_VERSION=$(jq -r '.version' manifest.chrome.json) | |
echo "MANIFEST_VERSION=$MANIFEST_VERSION" >> $GITHUB_ENV | |
- name: Upload step | |
run: |- | |
chrome-webstore-upload upload -v \ | |
--source dist/package/chrome/boycott-z-${{ env.MANIFEST_VERSION }}.zip \ | |
--extension-id ${{ vars.EXTENSION_ID }} \ | |
--client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} \ | |
--client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} \ | |
--refresh-token ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }} |