-
Notifications
You must be signed in to change notification settings - Fork 13
40 lines (37 loc) · 1.27 KB
/
nodejs.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: install, build and test
run: |
yarn install --frozen-lockfile
yarn pre-build-check
yarn build-packages
yarn post-build-check
env:
CI: true
- name: "Compressed Size"
uses: preactjs/compressed-size-action@6fa0e7ca017120c754863b31123c5ee2860fd434
with:
build-script: "-v" # Will execute `yarn run -v` (essentially a no-op)
pattern: "packages/*/dist/*.js"
- name: Create Release
if: ${{ github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'next') && !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') }}
run: |
yarn auto shipit
rm $HOME/.npmrc || true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CI: true