Skip to content

Commit 888c099

Browse files
authored
Merge pull request #2 from luk4x/chore/publish-workflow
chore: created publish workflow
2 parents d31f7d8 + 3d903f5 commit 888c099

4 files changed

Lines changed: 55 additions & 4 deletions

File tree

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"commit": false,
55
"fixed": [],
66
"linked": [],
7-
"access": "restricted",
7+
"access": "public",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
1010
"ignore": []

.changeset/crisp-wings-drop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@luk4x/list': patch
3+
---
4+
5+
setup publish workflow

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
id-token: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 10.28.2
26+
27+
- name: Setup Node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 18
31+
cache: pnpm
32+
registry-url: 'https://registry.npmjs.org'
33+
34+
- name: Install
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Create Release Pull Request or Publish to npm
38+
uses: changesets/action@v1
39+
with:
40+
version: pnpm -s version-packages
41+
publish: pnpm -s release
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"dist",
2626
"templates",
2727
"index.d.ts",
28+
"CHANGELOG.md",
2829
"README.md",
2930
"LICENSE"
3031
],
@@ -40,16 +41,18 @@
4041
"url": "git+https://github.com/luk4x/list.git"
4142
},
4243
"scripts": {
44+
"prepare": "husky",
45+
"changeset": "changeset",
46+
"version-packages": "changeset version",
47+
"release": "changeset publish --provenance",
4348
"test": "vitest run",
4449
"test:watch": "vitest",
4550
"test:types": "tsd && echo \"All type tests passed\"",
4651
"test:all": "pnpm test && pnpm test:types",
4752
"typecheck": "tsc",
4853
"lint": "eslint .",
49-
"prepare": "husky",
5054
"dev": "pnpm run build && node ./dist/cli.mjs",
51-
"build": "tsup",
52-
"prepublishOnly": "pnpm build"
55+
"build": "tsup"
5356
},
5457
"tsd": {
5558
"directory": "tests/type-tests"

0 commit comments

Comments
 (0)