-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.5 KB
/
on-pr.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
name: CI - Pull Request
on: pull_request
# Pull Request Runs on the same branch will be cancelled
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
env:
FIGMA_ACCESS_TOKEN: ${{secrets.FIGMA_PERSONAL_ACCESS_TOKEN}}
jobs:
compile_js_modules:
name: Compile JS Modules
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{github.head_ref}}
- name: Install packages
run: npm ci
- name: Run tests
run: npm run test
release-comment:
name: Release Comment
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request, 'chore(main): release zeta-icons') }}
steps:
# - name: Get lastUpdated from package.json
# id: lastUpdated
# run: echo "lastUpdated=$(cat package.json | jq .lastUpdated)" >> $GITHUB_OUTPUT
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) | jq .title}}
run: echo "$GITHUB_CONTEXT"
- name: Comment
uses: mikedloss/create-update-comment@v1
# env:
# lastUpdated: ${{cat package.json | jq .lastUpdated}}
with:
token: ${{ secrets.GITHUB_TOKEN }}
unique-identifier: "lastUpdated comment"
message: |
### PR is ready to merge.
Last updated: $(cat package.json | jq .lastUpdated)