Skip to content

checkout from main

checkout from main #6

name: version packages
on:
push:
branches:
- new-prod-release-workflow
jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: main
depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Checkout branch
run: |
git checkout -b release-test
git push origin release-test
- name: Install Dependencies
run: yarn install --frozen-lockfile --ignore-optional
- name: Build
run: NODE_ENV=production yarn build
- name: Version packages
run: yarn lerna version minor --allow-branch release-test --force-publish=@segment/action-destinations --no-private --yes
- name: Create PR
run: |
gh pr create --base main --head release-test --fill --draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}