Prepare Release #7
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: Prepare Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version number (e.g., 1.2.3)' | |
| required: true | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Cache Yarn dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .yarn/cache | |
| key: yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| yarn- | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Update versions and samples | |
| run: | | |
| VERSION=${{ github.event.inputs.version }} | |
| echo "Updating all workspace versions to $VERSION" | |
| yarn workspaces foreach -Av version $VERSION | |
| yarn update-samples | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore(release): bump version to v${{ github.event.inputs.version }}' | |
| branch: release/v${{ github.event.inputs.version }} | |
| base: master | |
| title: 'Release v${{ github.event.inputs.version }}' | |
| body: | | |
| This PR prepares the release of version v${{ github.event.inputs.version }}. | |
| Once merged into master, the publish workflow will trigger. |