Comment to HTML snippets. #41
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: Publish Package to NPM | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Check Package Version Change | |
uses: EndBug/version-check@v1 | |
id: check | |
with: | |
file-name: ./projects/ngx-notation-reveal/package.json | |
file-url: https://unpkg.com/ngx-notation-reveal@latest/package.json | |
static-checking: localIsNew | |
- name: Version Update Detected | |
if: steps.check.outputs.changed == 'true' | |
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"' | |
- name: Remove Dependencies | |
if: steps.check.outputs.changed == 'true' | |
run: rm yarn.lock | |
- name: Install Packages | |
if: steps.check.outputs.changed == 'true' | |
run: yarn install | |
- name: Build Project | |
if: steps.check.outputs.changed == 'true' | |
run: yarn build:lib | |
- name: Copy Readme | |
if: steps.check.outputs.changed == 'true' | |
run: yarn readme | |
- name: Copy License | |
if: steps.check.outputs.changed == 'true' | |
run: yarn license | |
- name: Publish to NPM | |
if: steps.check.outputs.changed == 'true' | |
run: npm publish ./dist/ngx-notation-reveal | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |