archive #11
Workflow file for this run
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: Build and publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- run: git archive --format=zip --output=source.zip HEAD | |
- run: ls -lh | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Pack | |
run: npm run pack | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: archives | |
path: dist/*.zip | |
- name: Get zip path | |
run: echo "ZIP_CHROME=dist/$(ls dist | grep chrome)" >> $GITHUB_ENV | |
- name: Upload to Chrome Web Store | |
uses: mobilefirstllc/cws-publish@latest | |
with: | |
action: 'upload' | |
client_id: ${{ secrets.CHROME_ID }} | |
client_secret: ${{ secrets.CHROME_SECRET }} | |
refresh_token: ${{ secrets.CHROME_REFRESH_TOKEN }} | |
extension_id: 'nhjapojbdgmjlnmlenegefgfjannjchb' | |
zip_file: ${{ env.ZIP_CHROME }} |