Skip to content

5.4.0

5.4.0 #21

Workflow file for this run

name: Publish Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
registry-url: https://registry.npmjs.org/
- name: Install lib dependencies
run: npm install
- name: Serve test server
run: npx nx serve-test halstack-react-hal
- name: Test lib
run: npx nx test halstack-react-hal
- name: Stop json-server
run: kill $(lsof -t -i:3000)
- name: Build library
run: npx nx build halstack-react-hal
- name: Copy README
run: npx nx run copy
- name: Publish RELEASE to npm
run: |
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"${TAG_NAME}\"#" ./lib/dist/package.json
cd lib/dist
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
TAG_NAME: ${{ github.event.release.tag_name }}