-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (69 loc) · 2.45 KB
/
ngx-tailwind-ui.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
70
71
72
73
74
75
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: "@ngx-tailwind/ui"
on:
push:
branches: [ "next", "release", "master" ]
paths: [ "projects/ngx-tailwind-ui/**", ".github/workflows/ngx-tailwind-ui.yml" ]
pull_request:
branches: [ "next" ]
paths: [ "projects/ngx-tailwind-ui/**" ]
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTHTOKEN }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
project: [ngx-tailwind-ui]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm add @ngx-tailwind/core@file:projects/ngx-tailwind-core/src
sed "s/ngx-tailwind/temp/g" -i ./tsconfig.json
pnpm install
- name: Lint
run: pnpm lint:${{ matrix.project }}
- name: Build
run: pnpm build:${{ matrix.project }}
- name: Test
run: |
sed "s/temp/ngx-tailwind/g" -i ./tsconfig.json
pnpm install-chrome
pnpm test:${{ matrix.project }}:ci
- name: Publish test results summary
uses: janisz/action@v2
with:
paths: "junit/**/TESTS-*.xml"
- name: Publish artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.project }}-${{ github.run_id }}
path: "dist/${{ matrix.project }}"
- if: github.event_name == 'push' && github.ref == 'refs/heads/release'
name: Publish @beta
run: |
cd dist/${{ matrix.project }}
pnpm version ${{ vars.BETA_VERSION }}
pnpm publish --tag beta --no-git-checks
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Publish @latest
run: |
cd dist/${{ matrix.project }}
pnpm version ${{ vars.LATEST_VERSION }}
pnpm publish --tag latest --no-git-checks
- if: github.event_name == 'push' && github.ref == 'refs/heads/next'
name: Publish @alpha
run: |
cd dist/${{ matrix.project }}
pnpm version ${{ vars.ALPHA_VERSION }}
pnpm publish --tag alpha --no-git-checks