Skip to content

docs(blog): add community contributions post (#6172) #453

docs(blog): add community contributions post (#6172)

docs(blog): add community contributions post (#6172) #453

name: Release Please
on:
push:
branches:
- main
workflow_dispatch:
inputs:
target_branch:
description: "Branch to run Release Please against"
default: "main"
required: false
permissions:
contents: read
id-token: write
jobs:
release_please:
name: release-please
runs-on: ubuntu-latest
outputs:
releaseCreated: ${{ steps.release.outputs.release_created }}
version: ${{ steps.release.outputs.version }}
permissions:
contents: write
pull-requests: write
steps:
- uses: googleapis/release-please-action@v5
id: release
with:
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json
target-branch: ${{ inputs.target_branch || 'main' }}
npm_publish:
name: Publish to npm
runs-on: ubuntu-latest
environment: npm
needs: release_please
if: needs.release_please.outputs.releaseCreated
steps:
- uses: actions/checkout@v7
with:
show-progress: false
- uses: actions/setup-node@v7
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
# If this step fails, it may be a transient issue, just run again
# https://github.com/mochajs/mocha/issues/5611
- name: Upgrade npm for OIDC support
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci --ignore-scripts --force --no-fund --no-audit
- name: Determine npm dist-tag
id: dist_tag
env:
VERSION: ${{ needs.release_please.outputs.version }}
run: |
if [[ "$VERSION" == *-alpha* ]]; then
echo "tag=alpha" >> "$GITHUB_OUTPUT"
else
echo "tag=next" >> "$GITHUB_OUTPUT"
fi
- run: npm publish --provenance --access public --tag=${{ steps.dist_tag.outputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}