Skip to content

chore(workflow): create a GitHub action for dry running publish process #8

chore(workflow): create a GitHub action for dry running publish process

chore(workflow): create a GitHub action for dry running publish process #8

name: Dry Run Publish
on:
pull_request:
branches:
- main
paths:
- ".changeset/**"
jobs:
dry-run-publish:
name: Dry Run Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Setup Node & pnpm
uses: ./.github/actions/setup-pnpm
- name: Install Dependencies
run: pnpm install
- name: Run Dry Run Publish
run: pnpm -r publish --dry-run
- name: Output Summary
id: summary
uses: actions/github-script@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
return `## Dry Run Publish Results
This workflow ran a dry-run of the publish process to detect potential release issues.
- **Status:** Completed
`
- name: Post Summary
run: echo -e ${{ steps.summary.outputs.result }} >> $GITHUB_STEP_SUMMARY