Skip to content

Commit fc3a263

Browse files
committed
chore(ci): run test commands
1 parent 5a81c04 commit fc3a263

File tree

2 files changed

+46
-21
lines changed

2 files changed

+46
-21
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
name: CI
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
8-
permissions:
9-
contents: write
10-
pull-requests: write
11-
packages: write
4+
pull_request_target:
125

136
# Automatically cancel in-progress actions on the same branch
147
concurrency:
@@ -28,17 +21,5 @@ jobs:
2821
cache: "pnpm"
2922
- if: ${{ steps.cache-node.outputs.cache-hit != 'true' }}
3023
run: pnpm install
31-
# TODO: is this manual build step actually needed?
32-
# `prepack` hook _should_ run but doesn't seem to.
3324
- run: pnpm run type-check
34-
- run: pnpm run build
35-
- uses: changesets/action@v1
36-
if: ${{ github.event_name != 'pull_request' }}
37-
with:
38-
version: pnpm run ci:version
39-
publish: pnpm run ci:publish
40-
commit: "[ci] release"
41-
title: "[ci] release"
42-
env:
43-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- run: pnpm run test

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
packages: write
12+
13+
# Automatically cancel in-progress actions on the same branch
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
name: Build Packages
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: pnpm/action-setup@v2
25+
- uses: actions/setup-node@v3
26+
with:
27+
node-version: 18
28+
cache: "pnpm"
29+
- if: ${{ steps.cache-node.outputs.cache-hit != 'true' }}
30+
run: pnpm install
31+
# TODO: is this manual build step actually needed?
32+
# `prepack` hook _should_ run but doesn't seem to.
33+
- run: pnpm run type-check
34+
- run: pnpm run build
35+
- uses: changesets/action@v1
36+
if: ${{ github.event_name != 'pull_request' }}
37+
with:
38+
version: pnpm run ci:version
39+
publish: pnpm run ci:publish
40+
commit: "[ci] release"
41+
title: "[ci] release"
42+
env:
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)