chore: release v1.0.0-beta.2 #59
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*' | |
| jobs: | |
| release: | |
| permissions: | |
| id-token: write | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Verify tag is on master | |
| env: | |
| TAG_SHA: ${{ github.sha }} | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| git fetch origin master | |
| if ! git merge-base --is-ancestor "$TAG_SHA" origin/master; then | |
| echo "::error::Tag $TAG_NAME ($TAG_SHA) is not an ancestor of origin/master. Refusing to release from an off-master commit." | |
| exit 1 | |
| fi | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Set node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| # Ensure npm 11.5.1 or later is installed | |
| - name: Update NPM | |
| run: npm install -g npm@latest | |
| # Substrate only. @vuetify/v0 + @vuetify/paper version in lockstep and ship | |
| # from this tag; @paper/* design systems are versioned and released | |
| # independently. Allowlist is explicit on purpose — a new substrate package | |
| # must be added here; a new design system must NOT. | |
| - name: Publish to NPM | |
| run: pnpm --filter @vuetify/v0 --filter @vuetify/paper publish --access public --no-git-checks | |
| # Fail loud if either substrate package's tagged version did not actually | |
| # land on npm (e.g. a partial `-r publish`, which once left paper ~4h | |
| # behind v0). Tag-agnostic: asserts the exact version exists, not a dist-tag. | |
| - name: Verify substrate published | |
| run: | | |
| set -euo pipefail | |
| for pkg in packages/0 packages/paper; do | |
| name=$(node -p "require('./$pkg/package.json').name") | |
| version=$(node -p "require('./$pkg/package.json').version") | |
| echo "Verifying $name@$version on npm..." | |
| found=0 | |
| for attempt in 1 2 3 4 5; do | |
| if npm view "$name@$version" version >/dev/null 2>&1; then | |
| found=1 | |
| break | |
| fi | |
| echo " not visible yet (attempt $attempt), retrying in 5s" | |
| sleep 5 | |
| done | |
| if [ "$found" -ne 1 ]; then | |
| echo "::error::$name@$version is missing from npm — the substrate publish did not complete." | |
| exit 1 | |
| fi | |
| echo " confirmed $name@$version" | |
| done | |
| # Runs last so a red build/publish/verify never mints a GitHub release | |
| - name: GitHub release | |
| run: pnpm conventional-github-releaser -p vuetify | |
| env: | |
| CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }} |