generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.2 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
45
46
name: 'CI'
on: # rebuild any PRs and main branch changes
pull_request:
types:
- opened
- synchronize
push:
branches: [ master ]
concurrency:
group: "CI-${{ github.head_ref }}"
cancel-in-progress: true
jobs:
ci-tests:
name: "CI tests"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: Retrieve node version for the action
id: node_version
run: |
make get-action-nodejs-version
echo "version=$(make get-action-nodejs-version)" >> $GITHUB_OUTPUT
- name: Configure NodeJs version
uses: actions/setup-node@v4
with:
node-version: '${{ steps.node_version.outputs.version }}'
- name: "Build "
run: make build && make package
- name: "Detect forgotten compilation before push"
run: |
if test -z "$(git diff --name-only dist/)"; then
echo "JS files up-to-date 👌";
exit 0;
fi
echo "::error::JS files are outdated ! Run 'nvm use && make build && make package && git add dist && git commit -m \"Re-compile TS files\"'.";
exit 1;
- name: "Lint"
run: make lint