Skip to content

Update ngx-window-token.yml #59

Update ngx-window-token.yml

Update ngx-window-token.yml #59

name: ngx-window-token
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
always-auth: true
- uses: actions/cache@v3
id: angular-cache
with:
path: |
.angular/cache
key: ${{ runner.os }}-ng-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-ng
- name: Install dependencies
run: yarn --pure-lockfile --non-interactive --no-progress
# Fix linting errors first
# - name: Run TSLint
# run: yarn lint
- name: Run tests
run: yarn test --configuration=ci
- name: Build host app
run: yarn ng build
- name: Build library
run: yarn build
- name: Publish library
if: github.event_name == 'workflow_dispatch'
run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc && yarn publish:lib --non-interactive
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}