Skip to content

Commit dd69f50

Browse files
committed
Setup changeset
1 parent 3b456da commit dd69f50

File tree

15 files changed

+2275
-1156
lines changed

15 files changed

+2275
-1156
lines changed

.changeset/aggregate.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import { execSync } from "node:child_process";
44

55
const THANKLESS_COMMITTERS = ["thdxr", "fwang", "jayair"];
66

7-
const { version } = JSON.parse(
8-
await fs.readFile("./packages/core/package.json")
9-
);
7+
const { version } = JSON.parse(await fs.readFile("./package.json"));
108

119
const changesets = JSON.parse(await fs.readFile(".changeset/config.json"));
1210
const packages = changesets.fixed[0];
@@ -48,6 +46,9 @@ for (const pkg of packages) {
4846
}
4947
}
5048

49+
const notes = ["#### Changes", ...changes];
50+
console.log(notes.join("\n"));
51+
console.log(`::set-output name=notes::${notes.join("%0A")}`);
5152
console.log(`::set-output name=version::v${version}`);
5253

5354
execSync(`git tag v${version}`);

.changeset/chilly-hounds-pump.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/config.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
{ "repo": "serverless-stack/open-next" }
66
],
77
"commit": false,
8-
"fixed": [
9-
[
10-
"open-next"
11-
]
12-
],
8+
"fixed": [["open-next"]],
139
"linked": [],
14-
"access": "restricted",
10+
"access": "public",
1511
"baseBranch": "main",
1612
"updateInternalDependencies": "patch",
1713
"ignore": []

.changeset/heavy-hairs-suffer.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/popular-rings-wash.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/release

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ set -e
33

44
pnpm build
55
cp package.json dist/package.json
6+
cp README.md dist/README.md
67
sed -i.bak -e '2,5d' dist/package.json
7-
pnpm changeset publish
8-
8+
pnpm changeset publish

.changeset/snapshot

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ cp package.json dist/package.json
88
sed -i.bak -e '2,5d' dist/package.json
99
pnpm changeset publish --no-git-tag --tag=snapshot
1010
cp .changeset/config.json.bak .changeset/config.json
11-
git checkout '**/package.json' '**/CHANGELOG.md' '.changeset'
12-
11+
git checkout '**/package.json' '**/CHANGELOG.md' '.changeset'

.changeset/version

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
set -e
3+
4+
pnpm changeset version

.github/workflows/release.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@ name: Release
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77

88
concurrency: ${{ github.workflow }}-${{ github.ref }}
99

1010
jobs:
1111
release:
1212
name: Release
1313
runs-on: ubuntu-latest
14-
defaults:
15-
run:
16-
working-directory: cli
1714
steps:
1815
- name: Checkout Repo
1916
# https://github.com/actions/checkout
@@ -25,23 +22,39 @@ jobs:
2522
with:
2623
node-version: 16.x
2724

28-
- uses: actions/cache@v2
29-
id: yarn-cache
25+
- uses: pnpm/action-setup@v2
3026
with:
31-
path: "**/node_modules"
32-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
27+
version: 7
28+
run_install: false
29+
30+
- name: Get pnpm store directory
31+
id: pnpm-cache
32+
shell: bash
33+
run: |
34+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
35+
36+
- uses: actions/cache@v3
37+
name: Setup pnpm cache
38+
with:
39+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
3343
3444
- name: Install dependencies
35-
if: steps.yarn-cache.outputs.cache-hit != 'true'
36-
run: yarn --frozen-lockfile --ignore-scripts
45+
run: pnpm install
46+
47+
- name: Check prettier
48+
run: pnpm prettier --cache -c --loglevel=error .
3749

3850
- name: Create Release Pull Request or Publish to npm
3951
id: changesets
4052
# https://github.com/changesets/action
4153
uses: changesets/action@v1
4254
with:
4355
createGithubReleases: false
44-
publish: yarn release
56+
version: pnpm run version
57+
publish: pnpm run release
4558
env:
4659
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4760
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
docs/
2-
example/
3-
docs/
2+
example/

0 commit comments

Comments
 (0)