Skip to content

feat: set version to 2.0.0 #44

feat: set version to 2.0.0

feat: set version to 2.0.0 #44

Workflow file for this run

name: CI Master
on:
push:
tags:
- '*'
jobs:
build-library:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "14"
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: |
npm ci
npm uninstall -g @angular/cli
npm install -g @angular/cli@12
- name: Set Version
run: sed -i "s/\[ci-version\]/${GITHUB_REF##*/}-$GITHUB_RUN_NUMBER/g" ./version.ts
- name: Build Library
run: ng build --project angular-toastify
- name: Publish Library to NPM
run: npm publish ./dist/angular-toastify
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
deploy-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "14"
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: |
npm ci --force
npm uninstall -g @angular/cli
npm install -g @angular/cli@12
- name: Deploy pages
env:
GITHUB_TOKEN: ${{ secrets.PAGES_SECRET }}
run: |
sed -i "s/\[\[VERSION\]\]/$GITHUB_REF_NAME/g" ./projects/demo/src/environments/environment.prod.ts
sed -i "s/\[\[BUILD_DATE\]\]/$(git log -1 --format=%cd --date=format:%Y%m%dh%H%M%S)/g" ./projects/demo/src/environments/environment.prod.ts
ng build --configuration=production --base-href "/angular-toastify/"
npx angular-cli-ghpages --repo=https://github.com/scenius-software/angular-toastify.git --dir=dist/demo --name="Scenius Software Engineering" --email="support@scenius.nl"