Skip to content

Release/fhi-angular-components/4.4.1 (#660) #51

Release/fhi-angular-components/4.4.1 (#660)

Release/fhi-angular-components/4.4.1 (#660) #51

name: Automatic publish of @folkehelseinstituttet/angular-components to NPM
on:
push:
branches:
- 'dev'
- 'fhi-angular-components/**'
paths:
- 'projects/fhi-angular-components/package.json'
jobs:
publish:
if: "contains(github.event.head_commit.message, 'Release/fhi-angular-components/')"
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-components
run: |
npm install
npm run build-angular-components
- name: Check new npm version and publish
id: publish
uses: JS-DevTools/[email protected]
with:
access: 'public'
strategy: all
package: dist/fhi-angular-components/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 }}"