Skip to content

chore(migration): update publish workflow (#2072) #1436

chore(migration): update publish workflow (#2072)

chore(migration): update publish workflow (#2072) #1436

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_GITHUB_TOKEN }}
fetch-depth: 0
- uses: .github/actions/setup
with:
install: false
build: false
- name: Update versions and changelogs
id: versions
run: pnpm changeset version
- name: Update lockfile
run: pnpm install
- name: Commit updated lockfile
uses: EndBug/add-and-commit@v7
with:
add: "pnpm-lock.yaml"
branch: ${{ github.event.pull_request.base.ref }}
message: "chore: update versions and lockfile"
github_token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}