Skip to content

Bump @inquirer/confirm to ^5.1.21 (#930) #538

Bump @inquirer/confirm to ^5.1.21 (#930)

Bump @inquirer/confirm to ^5.1.21 (#930) #538

Workflow file for this run

name: Publish packages
# single workflow for both preview and stable as we can only specify a single
# workflow file for trusted publishing
on:
push:
branches:
- master
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
workflow_dispatch:
inputs:
sha:
description: 'Commit SHA to release from'
required: false
type: string
preview:
description: 'Force preview publishing instead of stable release'
required: false
type: boolean
default: false
dry-run:
description: 'Run in dry-run mode without actually publishing packages'
required: false
type: boolean
default: false
github-release:
description: 'Create a GitHub release after publishing'
required: false
type: boolean
default: true
dist-tag:
description: 'NPM dist tag to publish to'
required: false
type: string
default: 'latest'
permissions: {}
jobs:
publish-preview:
if: >
github.event_name == 'schedule'
|| (github.event_name == 'push' && github.event.head_commit.author.name != 'renovate[bot]')
|| (github.event_name == 'workflow_dispatch' && inputs.preview == true)
runs-on: ubuntu-latest
permissions:
contents: write # Required for pushing tags and creating releases
id-token: write # Required for provenance
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ github.event_name == 'push' && github.sha || inputs.sha }}
fetch-depth: 0 # Fetch full history for proper git operations
- name: Prepare for publishing
uses: ./.github/actions/publish-prepare
- name: Publish packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Build common flags
ARGS=""
if [ "${{ inputs.dry-run }}" = "true" ]; then
ARGS="$ARGS --dry-run"
fi
# Enable github-release by default for non-workflow_dispatch triggers
# or when explicitly set to true in workflow_dispatch
if [ "${{ github.event_name }}" != "workflow_dispatch" ] || [ "${{ inputs.github-release }}" = "true" ]; then
ARGS="$ARGS --github-release"
fi
pnpm code-infra publish-canary $ARGS
publish:
if: github.event_name == 'workflow_dispatch' && inputs.preview != true
runs-on: ubuntu-latest
permissions:
contents: write # Required for pushing tags and creating releases
id-token: write # Required for provenance
environment:
name: npm-publish
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ inputs.sha }}
fetch-depth: 0 # Fetch full history for proper git operations
- name: Prepare for publishing
uses: ./.github/actions/publish-prepare
- name: Publish packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Build common flags
ARGS=""
if [ "${{ inputs.dry-run }}" = "true" ]; then
ARGS="$ARGS --dry-run"
fi
if [ "${{ inputs.github-release }}" = "true" ]; then
ARGS="$ARGS --github-release"
fi
if [ -n "${{ inputs.dist-tag }}" ]; then
ARGS="$ARGS --tag ${{ inputs.dist-tag }}"
fi
pnpm code-infra publish $ARGS