Deploy to prod #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Production NPM Packages Publishing | |
on: | |
pull_request: | |
types: [closed] | |
branches: ["main"] | |
jobs: | |
deploy-beta: | |
runs-on: ubuntu-latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- 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 |