Skip to content

Update dependency nock to v14.0.12 (#521) #143

Update dependency nock to v14.0.12 (#521)

Update dependency nock to v14.0.12 (#521) #143

Workflow file for this run

name: Publish
on:
push:
branches:
- main
paths:
- 'packages/*/package.json'
workflow_dispatch:
inputs:
dry-run:
description: 'Preview what would be published without actually publishing'
required: false
type: boolean
default: true
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
# Run for ship/version commits or manual dispatch.
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.head_commit.message, 'Published new versions')
permissions:
id-token: write
contents: read
env:
FORCE_COLOR: 1
NODE_OPTIONS: '--max_old_space_size=8192'
CI: true
IS_SHIPPING: true
NPM_CONFIG_PROVENANCE: true
NPM_CONFIG_REGISTRY: 'https://registry.npmjs.org'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn --frozen-lockfile --prefer-offline
- name: Build releasable packages
run: yarn nx run-many -t build
# npm 11+ is required for npm Trusted Publishing (OIDC).
- name: Install npm 11
run: npm install -g npm@11
- name: Configure npm registry
run: |
cat > "$HOME/.npmrc" <<EOF
registry=https://registry.npmjs.org/
@tryghost:registry=https://registry.npmjs.org/
EOF
npm config get registry
npm config get @tryghost:registry
- name: Publish to npm
run: npx nx release publish ${{ (github.event.inputs['dry-run'] == 'true' && '--dry-run') || '' }}
- uses: tryghost/actions/actions/slack-build@0cbdcbeb9030f46b109d5e6e44c14933026d8ca5 # main
if: failure()
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}