Skip to content

Commit 1f276ad

Browse files
committed
add changesets, prepare for publish
1 parent 61007b6 commit 1f276ad

File tree

7 files changed

+914
-4
lines changed

7 files changed

+914
-4
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/changelog-formatter.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { default: baseFunctions } = require("@changesets/changelog-github")
2+
3+
/*
4+
* This is just a small wrapper around the base changelog-github formatter that
5+
* removes "Thanks @Beeequeue!" as it would be on every changelog entry
6+
*/
7+
exports.default = {
8+
getDependencyReleaseLine: baseFunctions.getDependencyReleaseLine,
9+
getReleaseLine: async (...options) => {
10+
const line = await baseFunctions.getReleaseLine(...options)
11+
12+
return line.replace(/Thanks \[@BeeeQueue.*?!/g, "")
13+
},
14+
}

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@1.7.0/schema.json",
3+
"access": "public",
4+
"baseBranch": "main",
5+
"changelog": [
6+
"./changelog-formatter.js",
7+
{
8+
"repo": "BeeeQueue/sizer"
9+
}
10+
]
11+
}

.github/workflows/changesets.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths:
6+
- .changeset/**/*
7+
workflow_dispatch:
8+
9+
name: changesets
10+
11+
jobs:
12+
changesets:
13+
name: create pr / publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/checkout@v3
19+
with:
20+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
21+
fetch-depth: 0
22+
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 14.x
26+
27+
- run: corepack enable
28+
29+
- uses: actions/cache@v3
30+
with:
31+
path: ~/.pnpm-store
32+
key: v1-${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
33+
restore-keys: |
34+
v1-${{ runner.os }}-pnpm-
35+
36+
- name: Install dependencies
37+
run: pnpm install --frozen-lockfile
38+
39+
- name: Update release PR / Publish packages to `npm`
40+
uses: changesets/action@v1
41+
with:
42+
title: Release
43+
commit: Release new version
44+
publish: pnpm release
45+
env:
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v3
1717
with:
18-
node-version: 16
18+
node-version: 14
1919

2020
- run: corepack enable
2121

@@ -43,7 +43,7 @@ jobs:
4343

4444
- uses: actions/setup-node@v3
4545
with:
46-
node-version: 16
46+
node-version: 14
4747

4848
- run: corepack enable
4949

@@ -73,7 +73,7 @@ jobs:
7373

7474
- uses: actions/setup-node@v3
7575
with:
76-
node-version: 16
76+
node-version: 14
7777

7878
- run: corepack enable
7979

@@ -106,7 +106,7 @@ jobs:
106106

107107
- uses: actions/setup-node@v3
108108
with:
109-
node-version: 16
109+
node-version: 14
110110

111111
- run: corepack enable
112112

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "esbuild-cf-functions-plugin",
3+
"description": "A plugin to configure ESBuild for building code compatible with CloudFront Functions",
34
"version": "0.0.0",
45
"author": "BeeeQueue <adam@haglund.dev>",
56
"license": "MIT",
@@ -33,10 +34,13 @@
3334
"test": "vitest run",
3435
"test:dev": "vitest",
3536
"typecheck": "tsc --noEmit --project tsconfig.json",
37+
"release": "pnpm build && pnpm changeset publish",
3638
"prepare": "simple-git-hooks"
3739
},
3840
"devDependencies": {
3941
"@beequeue/eslint-plugin": "0.6.0",
42+
"@changesets/changelog-github": "0.4.5",
43+
"@changesets/cli": "2.23.0",
4044
"@tsconfig/node16": "1.0.2",
4145
"@types/node": "16.11.41",
4246
"c8": "7.11.3",

0 commit comments

Comments
 (0)