Skip to content

Release/fhi-angular-highcharts/5.2.0 (#764) #64

Release/fhi-angular-highcharts/5.2.0 (#764)

Release/fhi-angular-highcharts/5.2.0 (#764) #64

name: Automatic publish of @folkehelseinstituttet/angular-highcharts to NPM
on:
push:
branches:
- 'dev'
- 'fhi-angular-highcharts/**'
paths:
- 'projects/fhi-angular-highcharts/package.json'
jobs:
publish:
if: "contains(github.event.head_commit.message, 'Release/fhi-angular-highcharts/')"
name: Build and publish to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Build fhi-angular-highcharts
run: |
npm install
npm run build-angular-components
npm run build-angular-highcharts
- name: Check new npm version and publish
id: publish
uses: JS-DevTools/npm-publish@v3.0.1
with:
access: 'public'
strategy: all
package: dist/fhi-angular-highcharts/package.json
token: ${{ secrets.NPM_TOKEN }}
- name: Post publish status
if: steps.publish.outputs.type
run: |
echo "New Version: ${{ steps.publish.outputs.version }} has replaced old version: ${{ steps.publish.outputs.old-version }}"