Merge pull request #464 from iGLOO-be/omnipartners/loyalty-partnerTra… #190
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 with Lerna | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
Publish_Workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use node 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: yarn config | |
run: yarn config set ignore-engines true | |
- name: Git Identity | |
run: | | |
git config --global user.name 'Loic Mahieu' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prepare repository | |
run: git checkout "${GITHUB_REF:11}" | |
- name: Pulling | |
run: git pull | |
- name: Install dependencies | |
run: yarn install --pure-lockfile | |
- name: Build | |
run: yarn build | |
- name: Authenticate with Registry | |
run: | | |
yarn logout | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> $HOME/.npmrc | |
npm whoami | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish with Lerna | |
run: yarn lerna publish --yes --message 'chore(release)' | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |