Skip to content

Update README.md

Update README.md #33

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Publish
on:
pull_request:
types: [closed]
branches:
- development
- master
jobs:
publish:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.PUBLISH_PAT }}
GITHUB_TOKEN: ${{ secrets.PUBLISH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: "Use Node.js 16"
uses: actions/setup-node@v2
with:
node-version: '16'
- name: "Bootstrap"
run: |
npm run bootstrap
- name: "Test"
run: |
npm run test
- name: "Identity"
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git remote set-url origin https://${{github.actor}}:${GH_TOKEN}@github.com/$GITHUB_REPOSITORY
- name: "Version"
run: |
if [ ${{ github.base_ref }} = development ]; then
npx lerna version --conventional-commits --conventional-prerelease --preid beta --yes
else
npx lerna version --conventional-commits --conventional-graduate --yes
fi
- name: "NPM Identity"
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- name: "Publish"
run: |
npx lerna publish from-package --no-verify-access --yes