generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (33 loc) · 1.18 KB
/
main.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
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
CI_COMMIT_MESSAGE: Continuous Integration Build Project
CI_COMMIT_AUTHOR: ${{ github.event.repository.name }} Continuous Integration
steps:
- name: Display event name
run: echo "github.event_name=${{ github.event_name }}"
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci && npm run build && npm run lint
- name: Run unit tests
run: npm run test:ci
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v18
id: verify-changed-files
with:
files: dist
- name: Commit dist if changed
if: env.CI_COMMIT_AUTHOR != 'auto' && github.event_name != 'pull_request' && contains(steps.verify-changed-files.outputs.changed_files, 'dist')
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
git add .
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push