Skip to content

Bump version to v1.0.3 #158

Bump version to v1.0.3

Bump version to v1.0.3 #158

Workflow file for this run

name: Node.js CI
### github.ref
# tags refs/tags/v0.0.1
# master refs/heads/master
on: [push, pull_request]
jobs:
####### Print: Prints some context relating to the job to make future debugging easier
print:
name: Print context
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Print context 🎉
env:
GH_REF: ${{ github.ref }}
run: |
echo "GH_REF: ${GH_REF}"
####### Lint
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 18.x
- run: yarn prep
- run: yarn lint
####### Unit tests
unit_tests:
name: 'Unit tests'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 18.x
- run: yarn prep
- run: yarn test
####### Publish to npm
npm_publish:
name: Publish to npm
runs-on: ubuntu-latest
needs: [lint, unit_tests]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
- name: yarn publish
env:
IS_ALPHA: ${{ contains(github.ref, 'alpha')}}
IS_BETA: ${{ contains(github.ref, 'beta')}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ ${IS_ALPHA} = true ]; then export NPM_TAG="--tag alpha"; fi
if [ ${IS_BETA} = true ]; then export NPM_TAG="--tag beta"; fi
yarn prep
yarn publish --access=public ${NPM_TAG}