Skip to content

ci(release): introduce new release workflow #1

ci(release): introduce new release workflow

ci(release): introduce new release workflow #1

name: Create Version Bump PR with Beachball
on:
push:
branches:
- main
paths:
- 'change/**'
pull_request:
paths:
- '.github/workflows/create-version-bump-pr.yml'
- '.github/actions/beachball-release/**'
workflow_dispatch:
inputs:
dry-run:
description: 'Run in dry-run mode (skip push and PR creation)'
type: boolean
default: false
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
version-bump:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup the toolchain
uses: microsoft/react-native-test-app/.github/actions/[email protected]
with:
platform: node
project-root: .
cache-key-prefix: version-bump
node-version: '22.12'
cache-npm-dependencies: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Create version bump PR
id: beachball
uses: ./.github/actions/beachball-release
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(release): bump package versions [skip ci]'
pr-title: 'chore(release): bump package versions'
dry-run: ${{ (github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.dry-run)) && 'yes' || 'no' }}
- name: Output PR info
if: steps.beachball.outputs.published == 'yes'
run: |
echo "✅ Version bump PR created!"
echo "PR Number: ${{ steps.beachball.outputs.pr-number }}"
echo "PR URL: ${{ steps.beachball.outputs.pr-url }}"
- name: Dry-run info
if: (github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.dry-run))
run: |
echo "🔍 Workflow ran in dry-run mode"
echo "✅ Validation successful - no PRs were created"