dell-design-react-common CI - Release from main branch - Pipeline #12
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: dell-design-react-common CI - Release from main branch - Pipeline | |
# Controls when the action will run. | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
# Setup nodejs | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '16.14.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: setup configurations | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Mahesh Kulkarni" | |
npm config set @dellstorage:registry https://registry.npmjs.org/ | |
- name: build dependencies | |
run: yarn | |
- name: build dell-design-react-common project | |
run: | | |
rm -rf "./dist" | |
yarn run build | |
yarn run copy | |
- name: create package and publish | |
run: | | |
git pull | |
yarn run package | |
yarn run copy | |
export PREVIOUS_MESSAGE="$(git log --format=%B -n 1)" | |
git commit --amend -m "Published dell-design-react-common@$PREVIOUS_MESSAGE" | |
cd "./dist" | |
npm config set //registry.npmjs.org/:_authToken ${NODE_AUTH_TOKEN} | |
yarn run publish-public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |