ci(release): introduce new release workflow #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |