Skip to content

GitHub workflow

GitHub workflow #27

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches:
- main
jobs:
build_library:
name: build library
runs-on: ubuntu-latest
outputs:
version: ${{ steps.package-version.version}}
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: change directory
run: |
pwd
cd ./projects/we-select
- name: package version
id: package-version
run: |
npm pkg get version
echo "version=$(npm pkg get version)" >> $GITHUB_OUTPUT
- name: install angular CLI
run: npm install -g @angular/cli
- name: install dependencies
run: npm ci
- name: build we-select
run: ng build we-select
- name: run tests
run: ng test we-select --watch=false --browsers=ChromeHeadless
push_tags:
name: publish tags to github
needs: build_library
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
- name: git configuration
run: |
git config --global user.name "navenkumar"
git config --global user.email "naven.duraisamy5859@gmail.com"
- name: print version output
run: echo "${{ needs.build_library.outputs.version }}"
- name: create tags
run: git tag -a ${{ needs.build_library.outputs.version }}
- name: Push tags to repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git push origin --tags