v3.4.2 #24
Workflow file for this run
This file contains hidden or 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: | |
| release: | |
| types: [ created ] | |
| 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 | |
| - 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 | |
| echo "ZIP_FF=dist/$(ls dist | grep firefox)" >> $GITHUB_ENV | |
| - name: Publish to Firefox Add-ons | |
| uses: browser-actions/release-firefox-addon@v0.2.1 | |
| with: | |
| addon-id: "{2ac87779-a246-4986-9f4e-882292ec11af}" | |
| addon-path: ${{ env.ZIP_FF }} | |
| source-path: source.zip | |
| approval-note: | | |
| Requires Node.js to build. | |
| npm run build to build from source, output in build/ | |
| npm run pack to zip the build, output in dist/ | |
| release-note: "New release!" | |
| license: "MIT" | |
| auth-api-issuer: ${{ secrets.FF_ISSUER }} | |
| auth-api-secret: ${{ secrets.FF_SECRET }} | |
| - name: Publish to Chrome Web Store | |
| uses: mnao305/chrome-extension-upload@v5.0.0 | |
| with: | |
| extension-id: "nhjapojbdgmjlnmlenegefgfjannjchb" | |
| publish: true | |
| file-path: ${{ env.ZIP_CHROME }} | |
| client-id: ${{ secrets.CHROME_ID }} | |
| client-secret: ${{ secrets.CHROME_SECRET }} | |
| refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} |