chore(release): v0.3.2 #3
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| env: | |
| HUSKY: 0 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| version: 11.17.0 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Verify Tag Matches Package Version | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| PACKAGE_VERSION="$(node -p "require('./package.json').version")" | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| if [ "${TAG_VERSION}" != "${PACKAGE_VERSION}" ]; then | |
| echo "::error::Tag version ${TAG_VERSION} does not match package version ${PACKAGE_VERSION}" | |
| exit 1 | |
| fi | |
| - name: Sanity Checks | |
| run: pnpm run prepublish | |
| - name: Install Playwright Browsers | |
| run: pnpm exec playwright install --with-deps chromium firefox webkit | |
| - name: E2E | |
| run: pnpm run e2e:all | |
| - name: Publish To Npm | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: pnpm publish --access public --no-git-checks --provenance | |
| - name: Generate Changelog | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| TAG="${GITHUB_REF_NAME}" | |
| PREV_TAG="$(git tag --sort=-v:refname | grep -E '^v' | grep -v "^${TAG}$" | head -n 1 || true)" | |
| { | |
| echo "## ${TAG}" | |
| echo | |
| if [ -n "${PREV_TAG}" ]; then | |
| echo "Changes since ${PREV_TAG}:" | |
| echo | |
| git log "${PREV_TAG}..${TAG}" --pretty=format:'- %s (%h)' | |
| else | |
| echo "Changes:" | |
| echo | |
| git log "${TAG}" --pretty=format:'- %s (%h)' | |
| fi | |
| } > RELEASE_NOTES.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| body_path: RELEASE_NOTES.md |