name: Release on: workflow_dispatch: inputs: version: description: 'Version to release ("major", "minor", "patch", or "pre*" version; or specify version like "5.3.3")' required: true type: string args: description: 'Additional arguments to pass to release-it (e.g. "--dry-run"). See docs: https://github.com/release-it/release-it/blob/main/docs/git.md#configuration-options' required: false type: string jobs: release: runs-on: ubuntu-latest permissions: contents: write id-token: write steps: - name: Checkout code uses: actions/checkout@v6 with: fetch-depth: 0 ssh-key: ${{ secrets.RELEASE_KEY }} - name: Setup Node.js uses: actions/setup-node@v6 with: node-version: '22' registry-url: 'https://registry.npmjs.org' - name: Update npm for trusted publishing run: npm install --global npm@11 - name: Install dependencies run: npm ci - name: Configure Git run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" # Build all packages - name: Build packages run: npm run build # Release using the monorepo approach - name: Release packages run: npm run release -- --ci -i ${{ github.event.inputs.version }} ${{ github.event.inputs.args }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Packages are released one workspace at a time starting with @redis/client. # `npm version` runs a workspace-update install after the bump; because the sibling # packages still pin "@redis/client" to the pre-bump range until their own bumpers # run, that install ERESOLVEs. This is most visible on a pre-release bump (e.g. # 6.2.0-beta.0), which semver excludes from a plain "^6.1.0" range even though a # non-pre 6.2.0 would satisfy it. The post-bump install is throwaway (each package # publishes from its own dist), so skip it entirely — this avoids the resolve # altogether, rather than relaxing peer checks (which would pull the stale client # from the registry) and leaves the lockfile untouched. NPM_CONFIG_WORKSPACES_UPDATE: "false"