chore(deps): update angular-cli monorepo #291
Workflow file for this run
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: CI | |
on: [push] | |
jobs: | |
build: | |
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node_version: [16, 18] | |
# Windows (windows-latest) doesn't work with karma | |
os: [ubuntu-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v4 | |
with: | |
version: ${{ matrix.node_version }} | |
- name: npm install, build and test | |
run: | | |
npm install | |
npm run build | |
npm run test | |
deploy: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: publish release package | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc | |
npm i | |
npm run build && cd dist | |
npm publish | |
if: contains( github.ref, 'main' ) || contains( github.base_ref, 'main' ) | |
- name: publish preview package | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc | |
PACKAGE_VERSION=$(node -p -e "require('./package.json').version") | |
CURRENT_TIME=$(date +%s) | |
NEW_VERSION=${PACKAGE_VERSION}-build${CURRENT_TIME} | |
npm i | |
npm version $NEW_VERSION --no-git-tag-version | |
npm run build && cd dist | |
npm publish --tag next | |
if: contains( github.ref, 'develop' ) || contains( github.base_ref, 'develop' ) |