Skip to content

Optimize CI

Optimize CI #125

Workflow file for this run

name: Publish
on:
pull_request:
# types: [closed]
branches:
- development
- main
jobs:
publish:
# if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install Protobuf Compiler
run: sudo apt-get install -y protobuf-compiler
- name: Install dependencies
run: pnpm i
- name: Build dependencies
run: pnpm run build
- name: "Version and publish"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
if [ ${{ github.base_ref }} = development ]; then
npx lerna version --conventional-commits --conventional-prerelease --preid beta --yes --no-private --force-publish
else
npx lerna version --conventional-commits --conventional-graduate --yes --no-private --force-publish
fi