Skip to content

Commit 4172df8

Browse files
committed
remove changesets.
1 parent 793a929 commit 4172df8

File tree

2 files changed

+94
-45
lines changed

2 files changed

+94
-45
lines changed

.github/workflows/ci.yml

Lines changed: 89 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,111 @@ on:
88
branches-ignore:
99
- main
1010

11+
# Cancel in-progress runs on new commits to same PR
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1116
jobs:
12-
build-and-test:
17+
setup:
1318
runs-on: ubuntu-latest
14-
1519
steps:
1620
- name: Checkout code
1721
uses: actions/checkout@v3
1822
with:
1923
fetch-depth: 0
20-
24+
2125
- name: Setup Node.js
2226
uses: actions/setup-node@v3
2327
with:
2428
node-version: 18
25-
29+
cache: 'pnpm'
30+
2631
- name: Install pnpm
2732
uses: pnpm/action-setup@v2
2833
with:
2934
version: 8.9.0
30-
35+
run_install: false
36+
37+
- name: Get pnpm store directory
38+
shell: bash
39+
run: |
40+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV
41+
42+
- name: Setup pnpm cache
43+
uses: actions/cache@v3
44+
with:
45+
path: ${{ env.STORE_PATH }}
46+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
47+
restore-keys: |
48+
${{ runner.os }}-pnpm-store-
49+
3150
- name: Install dependencies
32-
run: pnpm install
33-
51+
run: pnpm install --frozen-lockfile
52+
53+
- name: Cache node_modules
54+
uses: actions/cache@v3
55+
with:
56+
path: node_modules
57+
key: ${{ runner.os }}-modules-${{ hashFiles('pnpm-lock.yaml') }}
58+
59+
build:
60+
needs: setup
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout code
64+
uses: actions/checkout@v3
65+
66+
- name: Setup Node.js
67+
uses: actions/setup-node@v3
68+
with:
69+
node-version: 18
70+
71+
- name: Install pnpm
72+
uses: pnpm/action-setup@v2
73+
with:
74+
version: 8.9.0
75+
run_install: false
76+
77+
- name: Restore node_modules
78+
uses: actions/cache@v3
79+
with:
80+
path: node_modules
81+
key: ${{ runner.os }}-modules-${{ hashFiles('pnpm-lock.yaml') }}
82+
3483
- name: Build
3584
run: pnpm build
36-
37-
- name: Test
38-
run: pnpm test
3985

40-
- name: Check for changeset
41-
run: |
42-
# Only run this check on pull requests
43-
if [[ $GITHUB_EVENT_NAME == 'pull_request' ]]; then
44-
# Check if there are any changes to source files
45-
if git diff --name-only origin/main HEAD | grep -q '^src/'; then
46-
echo "Changes detected in src directory. Checking for changeset..."
47-
# This will exit with non-zero if a changeset is needed but not present
48-
pnpm changeset status
49-
else
50-
echo "No changes to src directory detected. Skipping changeset check."
51-
fi
52-
else
53-
echo "Not a pull request. Skipping changeset check."
54-
fi
86+
- name: Upload build artifacts
87+
uses: actions/upload-artifact@v3
88+
with:
89+
name: build-output
90+
path: dist/
91+
retention-days: 1
92+
93+
test:
94+
needs: setup
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Checkout code
98+
uses: actions/checkout@v3
99+
100+
- name: Setup Node.js
101+
uses: actions/setup-node@v3
102+
with:
103+
node-version: 18
104+
105+
- name: Install pnpm
106+
uses: pnpm/action-setup@v2
107+
with:
108+
version: 8.9.0
109+
run_install: false
110+
111+
- name: Restore node_modules
112+
uses: actions/cache@v3
113+
with:
114+
path: node_modules
115+
key: ${{ runner.os }}-modules-${{ hashFiles('pnpm-lock.yaml') }}
116+
117+
- name: Test
118+
run: pnpm test

.github/workflows/release.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
name: Release
1+
name: CI
22

33
on:
44
push:
55
branches:
66
- main
77

88
permissions:
9-
contents: write
10-
pull-requests: write
11-
id-token: write
9+
contents: read
1210

1311
jobs:
14-
release:
15-
name: Release
12+
test:
13+
name: Test
1614
runs-on: ubuntu-latest
1715
steps:
1816
- name: Checkout
@@ -24,7 +22,6 @@ jobs:
2422
uses: actions/setup-node@v3
2523
with:
2624
node-version: 18
27-
registry-url: 'https://registry.npmjs.org'
2825

2926
- name: Install pnpm
3027
uses: pnpm/action-setup@v2
@@ -51,16 +48,4 @@ jobs:
5148
run: pnpm test
5249

5350
- name: Build
54-
run: pnpm build
55-
56-
- name: Create and publish release
57-
id: changesets
58-
uses: changesets/action@v1
59-
with:
60-
publish: pnpm publish -r
61-
commit: 'chore: version packages'
62-
title: 'chore: version packages'
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
66-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
run: pnpm build

0 commit comments

Comments
 (0)