-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (50 loc) · 1.61 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
uses: cd .\projects\we-select
- name: package version
id: package-version
run: 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