merge v1.2.0 release recovery #2
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 Extension | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| name: Validate and publish extension | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| env: | |
| CI: true | |
| steps: | |
| - name: Check out tagged source | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm run test | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Build website | |
| run: npm run build | |
| - name: Build and package tagged extension | |
| shell: pwsh | |
| run: ./scripts/package-extension.ps1 -ExpectedTag "${{ github.ref_name }}" | |
| - name: Upload unpacked extension | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: siptime-unpacked-${{ github.ref_name }} | |
| path: dist-extension | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Upload Chrome Web Store ZIP | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: releases/SipTime-v*-chrome.zip | |
| archive: false | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Upload checksum | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: releases/SHA256SUMS.txt | |
| archive: false | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Create GitHub release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| shell: bash | |
| run: | | |
| version="$(node -p "require('./package.json').version")" | |
| release_notes="docs/releases/${GITHUB_REF_NAME}.md" | |
| if [[ ! -f "${release_notes}" ]]; then | |
| echo "::error file=${release_notes}::Release notes are missing for ${GITHUB_REF_NAME}." | |
| exit 1 | |
| fi | |
| gh release create "${GITHUB_REF_NAME}" \ | |
| "releases/SipTime-v${version}-chrome.zip#Chrome Web Store package" \ | |
| "releases/SHA256SUMS.txt#SHA-256 checksum" \ | |
| --verify-tag \ | |
| --notes-file "${release_notes}" \ | |
| --title "SipTime ${GITHUB_REF_NAME}" |