Merge branch 'staging' of github.com:TheTechCompany/HiveCommand into … #566
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: Publish | |
on: | |
push: | |
branches: | |
# - master | |
- staging | |
paths: ["packages/core/**", "packages/drivers/**", "packages/types/**", "packages/clients/**", "packages/communication/**", ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: "Use NodeJS 16" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: | | |
yarn | |
- name: Build # Build all packages | |
run: npx lerna run build --no-private | |
- name: "Version and publish" # Interesting step | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor}}@users.noreply.github.com" | |
if [ ${{ github.ref }} = refs/heads/staging ]; then | |
npx lerna version --conventional-commits --conventional-prerelease --preid alpha --yes | |
else | |
npx lerna version --conventional-commits --conventional-graduate --yes | |
fi | |
npx lerna publish from-git --yes |