Skip to content

test by changing trigger #10

test by changing trigger

test by changing trigger #10

# This workflow is triggered manually via the GitHub Actions page or API
name: Version Packages
on:
# workflow_dispatch:
# inputs:
# branch:
# description: 'Branch to create PR from'
# required: true
# default: 'release-actions'
push:
branches:
- new-prod-release-workflow
jobs:
build-and-version-packages:
env:
HUSKY: 0
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: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Build
run: NODE_ENV=production yarn build
- name: Version Packages
run: yarn lerna version minor --allow-branch release-test --no-git-tag-version --no-commit-hooks --no-private --yes
- name: Commit and push
run: |
git add .
packages_published=$(git status -s -uno| grep "package.json" |awk '{print $2}'| xargs jq -r '.name + "@" + .version' --argjson null {})
git commit -m "Publish" -m "$packages_published"
git push origin release-test
- name: Create PR
run: |
gh pr create --base main --head release-test --fill --draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}