Skip to content

chore(update): major release 19.0.0 💥 #37

chore(update): major release 19.0.0 💥

chore(update): major release 19.0.0 💥 #37

Workflow file for this run

name: Build & Publish
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Cache node modules
uses: actions/cache@v4
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 demo app # Build Schematics and move
run: yarn build:demo --base-href https://bartholomej.github.io/ngx-translate-cut/
- name: Build ngx-translate-cut # Build
run: yarn build
- name: Run tests
run: yarn test --configuration=ci
- name: Publish NPM
run: cd dist/ngx-translate-cut && 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@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
scope: '@bartholomej'
- name: Publish to GitHub Package Registry
run: |
cd dist/ngx-translate-cut
npm publish
env:
NODE_AUTH_TOKEN: ${{github.token}}
- name: Deploy Github Pages
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./dist/demo