Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 48 additions & 20 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ on:
push:
branches:
- main
workflow_dispatch:
inputs:
tag:
description: 'Git tag to publish from'
required: true
type: string

jobs:
release-please:
runs-on: ubuntu-latest
Expand All @@ -20,89 +27,110 @@ jobs:
id: release
with:
token: ${{ steps.get-token.outputs.token }}
if: github.event_name == 'push'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this if looks wrong - it will only run on a push event and not a workflow_dispatch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retroactive reply copied from https://netlify.slack.com/archives/CTCRT6VB6/p1756284027411759?thread_ts=1756261623.711189&cid=CTCRT6VB6

Skipping the release please seemed fine, because release please action there only figures out packages to publish and I wanted to just attempt to publish everything as-is and ideally just ignore the cases of trying to publish version that is already on npm

- uses: actions/checkout@v5
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event_name == 'workflow_dispatch' }}
with:
token: ${{ steps.get-token.outputs.token }}
fetch-depth: 0
- name: Checkout tag for manual publish
if: github.event_name == 'workflow_dispatch'
run: git checkout ${{ github.event.inputs.tag }}
- uses: actions/setup-node@v4
with:
node-version: '*'
cache: 'npm'
check-latest: true
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event_name == 'workflow_dispatch' }}
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: 2.2.4
- run: npm ci
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event_name == 'workflow_dispatch' }}
- name: Build packages
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created || github.event_name == 'workflow_dispatch' }}
run: npm run build --workspaces=true

# Publishing packages in topological order, as defined in `package.json`.
- run: npm publish packages/types/ --provenance --access=public
if: ${{ steps.release.outputs['packages/types--release_created'] }}
if: ${{ steps.release.outputs['packages/types--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/dev-utils/ --provenance --access=public
if: ${{ steps.release.outputs['packages/dev-utils--release_created'] }}
if:
${{ steps.release.outputs['packages/dev-utils--release_created'] || github.event_name == 'workflow_dispatch'
}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/runtime-utils/ --provenance --access=public
if: ${{ steps.release.outputs['packages/runtime-utils--release_created'] }}
if:
${{ steps.release.outputs['packages/runtime-utils--release_created'] || github.event_name ==
'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/blobs/ --provenance --access=public
if: ${{ steps.release.outputs['packages/blobs--release_created'] }}
if: ${{ steps.release.outputs['packages/blobs--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/cache/ --provenance --access=public
if: ${{ steps.release.outputs['packages/cache--release_created'] }}
if: ${{ steps.release.outputs['packages/cache--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/edge-functions/ --provenance --access=public
if: ${{ steps.release.outputs['packages/edge-functions--release_created'] }}
if:
${{ steps.release.outputs['packages/edge-functions--release_created'] || github.event_name ==
'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/functions/ --provenance --access=public
if: ${{ steps.release.outputs['packages/functions--release_created'] }}
if:
${{ steps.release.outputs['packages/functions--release_created'] || github.event_name == 'workflow_dispatch'
}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/headers/ --provenance --access=public
if: ${{ steps.release.outputs['packages/headers--release_created'] }}
if:
${{ steps.release.outputs['packages/headers--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/images/ --provenance --access=public
if: ${{ steps.release.outputs['packages/images--release_created'] }}
if: ${{ steps.release.outputs['packages/images--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/nuxt-module/ --provenance --access=public
if: ${{ steps.release.outputs['packages/nuxt-module--release_created'] }}
if:
${{ steps.release.outputs['packages/nuxt-module--release_created'] || github.event_name == 'workflow_dispatch'
}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/redirects/ --provenance --access=public
if: ${{ steps.release.outputs['packages/redirects--release_created'] }}
if:
${{ steps.release.outputs['packages/redirects--release_created'] || github.event_name == 'workflow_dispatch'
}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/runtime/ --provenance --access=public
if: ${{ steps.release.outputs['packages/runtime--release_created'] }}
if:
${{ steps.release.outputs['packages/runtime--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/static/ --provenance --access=public
if: ${{ steps.release.outputs['packages/static--release_created'] }}
if: ${{ steps.release.outputs['packages/static--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/dev/ --provenance --access=public
if: ${{ steps.release.outputs['packages/dev--release_created'] }}
if: ${{ steps.release.outputs['packages/dev--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/vite-plugin/ --provenance --access=public
if: ${{ steps.release.outputs['packages/vite-plugin--release_created'] }}
if:
${{ steps.release.outputs['packages/vite-plugin--release_created'] || github.event_name == 'workflow_dispatch'
}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish packages/otel/ --provenance --access=public
if: ${{ steps.release.outputs['packages/otel--release_created'] }}
if: ${{ steps.release.outputs['packages/otel--release_created'] || github.event_name == 'workflow_dispatch' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Loading