Skip to content

fix(swr): handle various response types in useSWRInfinite pagination termination (#2584) #165

fix(swr): handle various response types in useSWRInfinite pagination termination (#2584)

fix(swr): handle various response types in useSWRInfinite pagination termination (#2584) #165

name: Publish Release
on:
pull_request:
types:
- closed
permissions:
contents: write
jobs:
publish:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Enable Corepack
run: corepack enable
- name: Cache Yarn dependencies
uses: actions/cache@v5
with:
path: .yarn/cache
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Run build
run: yarn build
- name: Configure npm authentication
run: |
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }}
- name: Publish workspaces to npm
run: yarn workspaces foreach --all --no-private -v npm publish --tolerate-republish --tag rc
- name: Extract version
id: version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create GitHub Tag
run: |
git tag v${{ steps.version.outputs.version }}
git push origin v${{ steps.version.outputs.version }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: Release v${{ steps.version.outputs.version }}
draft: false
prerelease: false