generated from darkobits/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.19 KB
/
ci.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
name: ci
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
env:
FORCE_COLOR: 3
concurrency:
group: ${{ github.ref_name }}
# Only cancel concurrent builds when we are not on the default branch. This
# way, if a commit breaks the default branch, we can more easily determine
# which commit caused the failure.
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
jobs:
ci:
name: CI
# Skip building tags; an identical job for the commit to which the tag
# points will be triggered anyway.
if: github.ref_type != 'tag'
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install Dependencies
run: npm clean-install
- name: Build Project
run: npx nr build
- name: Run Tests
run: npx nr test.smoke
- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx nr release