Skip to content

chore(update): major release 18.0.0 💥 #53

chore(update): major release 18.0.0 💥

chore(update): major release 18.0.0 💥 #53

Workflow file for this run

name: Build & Tests & Publish
on:
push:
tags:
- 'v*'
jobs:
build:
environment: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 20
uses: actions/setup-node@master
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies # Install all deps
run: yarn
- name: Sync versions # Sync versions
run: yarn syncprojects
- name: Build ngx-scrolltop # Build
run: yarn build
- name: Build Schematics # Build Schematics and move
run: yarn build:schematics
- name: Build demo app # Build Schematics and move
run: yarn build:demo --base-href https://bartholomej.github.io/ngx-scrolltop/
- name: Run tests # Build Schematics and move
run: yarn test --configuration=ci
- name: Publish NPM
run: cd dist/ngx-scrolltop && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
# Publish to GitHub Package Registry
- name: Set up package for GPR
run: yarn gpr:setup
- name: Use GPR
uses: actions/setup-node@master
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
scope: '@bartholomej'
- name: Publish to GitHub Package Registry
run: |
cd dist/ngx-scrolltop
npm publish
env:
NODE_AUTH_TOKEN: ${{github.token}}
- name: Deploy Github Pages
uses: peaceiris/[email protected]
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./dist/demo