Skip to content

Commit b329fb9

Browse files
authored
Merge pull request #2 from ghostdevv/package-and-publish
2 parents a2a083e + 77d5876 commit b329fb9

File tree

11 files changed

+1938
-35
lines changed

11 files changed

+1938
-35
lines changed

.changeset/config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{
6+
"repo": "ghostdevv/extractinator"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"access": "public",
12+
"ignore": [],
13+
"baseBranch": "main",
14+
"updateInternalDependencies": "patch"
15+
}

.changeset/good-deers-hope.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'extractinator': minor
3+
---
4+
5+
initial release

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
if: github.repository == 'ghostdevv/extractinator'
11+
permissions:
12+
contents: write # to create release (changesets/action)
13+
pull-requests: write # to create pull request (changesets/action)
14+
name: Release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/checkout@v4
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+
- name: Setup Node.js 18.x
24+
uses: actions/setup-node@v2
25+
with:
26+
node-version: 18.x
27+
28+
- name: Setup PNPM
29+
uses: pnpm/[email protected]
30+
with:
31+
version: 8.10.2
32+
33+
- name: Install Dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Build
37+
run: pnpm build
38+
39+
- name: Create Release Pull Request
40+
uses: changesets/action@v1
41+
with:
42+
publish: changeset publish
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitpod.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tasks:
2+
- init: pnpm install
3+
4+

package.json

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "extractinator",
3-
"version": "0.1.0",
3+
"version": "0.0.0",
44
"type": "module",
55
"description": "todo @fractalhq do this ty",
66
"contributors": [
@@ -10,7 +10,7 @@
1010
"scripts": {
1111
"extractinator": "DEBUG=1 vite-node src/cli.ts --",
1212
"playground": "pnpm run extractinator extract playground playground/out",
13-
"build": "tsup-node"
13+
"build": "tsup-node && publint"
1414
},
1515
"dependencies": {
1616
"@fastify/deepmerge": "^1.3.0",
@@ -26,9 +26,34 @@
2626
"typescript": "^5.2.2"
2727
},
2828
"devDependencies": {
29+
"@changesets/cli": "^2.26.2",
30+
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
2931
"@types/node": "^20.8.5",
32+
"publint": "^0.2.5",
3033
"tsup": "^7.2.0",
3134
"vite": "^4.4.11",
3235
"vite-node": "^0.34.6"
33-
}
36+
},
37+
"bin": "./dist/cli.js",
38+
"main": "./dist/package.cjs",
39+
"module": "./dist/package.js",
40+
"types": "./dist/package.d.ts",
41+
"exports": {
42+
".": {
43+
"require": {
44+
"types": "./dist/package.d.cts",
45+
"require": "./dist/package.cjs"
46+
},
47+
"import": {
48+
"types": "./dist/package.d.ts",
49+
"import": "./dist/package.js"
50+
}
51+
}
52+
},
53+
"files": [
54+
"dist",
55+
"LICENSE",
56+
"README.md",
57+
"CHANGELOG.md"
58+
]
3459
}

0 commit comments

Comments
 (0)