Update to Angular 18 in @folkehelseinstituttet/angular-components (#689) #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |