Skip to content

v0.2.11

v0.2.11 #23

Workflow file for this run

name: Publish package(s) to NPM
on:
release:
types: [created]
workflow_dispatch: {}
jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install modules
run: yarn install --immutable
- name: Build
run: yarn build
- name: Publish if version has been updated
run: |
for pkg in packages/*; do
name=$(basename "$pkg")
version=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$pkg/package.json')).version)")
if [ $(npm view "$name" version) != "$version" ]; then
echo "Publishing package $name @ $version."
cp README.md "$pkg"
yarn workspace "$name" npm publish
fi
done
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}