-
Notifications
You must be signed in to change notification settings - Fork 11
53 lines (42 loc) · 1.13 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
47
48
49
50
51
52
53
name: Foundations CI
on:
push:
branches: [main]
pull_request:
branches: [main]
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies from npm
run: npm ci
- name: Build Foundations
run: npm run build
- name: Confirm the build hasn't changed any files
run: ./check-pristine-state package-lock.json
- name: Run tests
run: npm test
ReleaseDraft:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Draft release notes
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}