Skip to content

prod deploy

prod deploy #36

name: Production NPM Packages Publishing
on:
pull_request:
types: [closed]
branches: ['master']
jobs:
deploy-prod:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.CI_TOKEN_PUBLIC }}
- name: Use Node.js 18.13.0
uses: actions/setup-node@v3
with:
node-version: 18.13.0
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build packages
run: yarn build:all
- name: Configure Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "humaci"
- name: Publish packages
run: |
yarn lerna:publish --yes
- name: Synchronize lerna version bump commit with develop branch
run: |
git fetch --unshallow
git checkout develop
git pull
git merge --no-ff master -m "Auto-merge master back to develop"
git push