chore: block merge if release label but no changeset, and adds date to the changelog #1809
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: Autobump | |
| on: | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| label-version-bump: | |
| name: Bump versions based on PR label | |
| runs-on: ubuntu-22.04 | |
| if: | | |
| github.event.pull_request.merged | |
| && contains(github.event.pull_request.labels.*.name, 'release') | |
| && github.event.pull_request.base.ref == 'main' | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.base.ref }} | |
| token: ${{ secrets.POSTHOG_BOT_PAT }} | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup | |
| with: | |
| build: false | |
| - name: Update versions and changelogs | |
| id: versions | |
| run: pnpm changeset version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update lockfile | |
| run: pnpm install | |
| - name: Commit updated lockfile | |
| uses: EndBug/add-and-commit@v7 | |
| with: | |
| add: "." | |
| branch: ${{ github.event.pull_request.base.ref }} | |
| message: "chore: update versions and lockfile" | |
| github_token: ${{ secrets.POSTHOG_BOT_PAT }} |