-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (48 loc) · 1.43 KB
/
ci.yaml
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
name: ci
on:
workflow_dispatch:
push:
branches:
- 'main'
pull_request: {}
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
ci:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: 📖 Check out repo
uses: actions/checkout@v3
- name: ⚙️ Set up Node
uses: actions/setup-node@v3
- name: 🔎 Install dependencies
run: npm i --force # todo: this should be npm ci
- name: ⚒️ Build
run: npm run build
# - name: 👀 Lint
# run: npm run lint
# - name: 🧪 Test
# run: npm run test:coverage
release:
timeout-minutes: 5
runs-on: ubuntu-latest
needs: ci
if: github.ref == 'refs/heads/main'
steps:
- name: 📖 Check out repo
uses: actions/checkout@v3
- name: ⚙️ Set up Node
uses: actions/setup-node@v3
- name: 🔎 Install dependencies
run: npm i --force # todo: this should be npm ci
- name: ⚒️ Build
run: npm run build
- name: 🚀 Release
if: github.repository == 'timdeschryver/ng-signal-forms' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta')
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CI: true