Release v0.1.13: clear Firefox AMO validation warnings #4
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: Release | |
| # Push a tag like v1.0.0 to build, package, publish to both stores, and cut a | |
| # GitHub Release. The tag is the single source of version truth: the leading "v" | |
| # is stripped and written into package.json + both manifests at build time. | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write # create the GitHub Release + upload assets | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| # ---------------------------------------------------------------- build/gate | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.ver.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Derive version from tag | |
| id: ver | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - run: npm ci | |
| - name: Stamp version into package.json (from tag) | |
| run: npm version "${{ steps.ver.outputs.version }}" --no-git-tag-version --allow-same-version | |
| - run: npm run typecheck | |
| - run: npm run lint | |
| - run: npm test | |
| - name: Build + package (prod) | |
| run: npm run zip | |
| - run: npm run lint:ext | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages | |
| path: dist/*.zip | |
| if-no-files-found: error | |
| # ------------------------------------------------------------- GitHub Release | |
| github-release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: packages | |
| path: dist | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| name: v${{ needs.build.outputs.version }} | |
| generate_release_notes: true | |
| files: dist/*.zip | |
| # ----------------------------------------------------------- Chrome Web Store | |
| # Requires (repo secrets): CHROME_EXTENSION_ID, CHROME_CLIENT_ID, | |
| # CHROME_CLIENT_SECRET, CHROME_REFRESH_TOKEN. The store item must be created | |
| # once manually first (see docs/RELEASING.md). | |
| publish-chrome: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: production # optional: add a required reviewer to gate store pushes | |
| env: | |
| VERSION: ${{ needs.build.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm version "$VERSION" --no-git-tag-version --allow-same-version | |
| - name: Build + package (prod) | |
| run: npm run zip | |
| - name: Upload & publish to Chrome Web Store | |
| run: > | |
| npx --yes chrome-webstore-upload-cli@3 upload | |
| --source "dist/crestapps-softphone-extension-chrome-v${VERSION}.zip" | |
| --extension-id "${{ secrets.CHROME_EXTENSION_ID }}" | |
| --client-id "${{ secrets.CHROME_CLIENT_ID }}" | |
| --client-secret "${{ secrets.CHROME_CLIENT_SECRET }}" | |
| --refresh-token "${{ secrets.CHROME_REFRESH_TOKEN }}" | |
| --auto-publish | |
| # ----------------------------------------------------------------- Firefox AMO | |
| # Requires (repo secrets): AMO_JWT_ISSUER, AMO_JWT_SECRET. The listed add-on's | |
| # first version is typically created via the AMO Developer Hub; subsequent | |
| # versions are submitted here. gecko id lives in manifest.firefox.json. | |
| publish-firefox: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: production | |
| env: | |
| VERSION: ${{ needs.build.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm version "$VERSION" --no-git-tag-version --allow-same-version | |
| - name: Build (prod, unpacked) | |
| run: npm run zip | |
| - name: Sign & submit to AMO (listed) | |
| run: > | |
| npx --yes web-ext sign | |
| --source-dir dist/firefox | |
| --channel listed | |
| --api-key "${{ secrets.AMO_JWT_ISSUER }}" | |
| --api-secret "${{ secrets.AMO_JWT_SECRET }}" |