Skip to content

Commit 52b8541

Browse files
committed
update workflow
1 parent 68c5742 commit 52b8541

File tree

5 files changed

+59
-46
lines changed

5 files changed

+59
-46
lines changed

.changeset/config.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3-
"changelog": "@changesets/cli/changelog",
4-
"commit": false,
5-
"fixed": [],
6-
"linked": [],
7-
"access": "restricted",
8-
"baseBranch": "main",
9-
"updateInternalDependencies": "patch",
10-
"ignore": [],
11-
"privatePackages": {
12-
"tag": true,
13-
"version": true
14-
}
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": [],
11+
"privatePackages": {
12+
"tag": true,
13+
"version": true
14+
}
1515
}

.changeset/eleven-signs-behave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'example-svelte': patch
3+
---
4+
5+
fix: update workflow

.github/workflows/publish.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
name: Publish
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
push:
5+
branches:
6+
- main
77

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

1010
jobs:
11-
release:
12-
name: Build & Publish Release
13-
runs-on: ubuntu-latest
11+
release:
12+
name: Build & Publish Release
13+
runs-on: ubuntu-latest
1414

15-
steps:
16-
- uses: actions/checkout@v4
17-
- uses: pnpm/action-setup@v4
18-
- uses: actions/setup-node@v4
19-
with:
20-
node-version: "20"
21-
cache: pnpm
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: pnpm
2222

23-
- name: Install dependencies
24-
run: pnpm install
23+
- name: Install dependencies
24+
run: pnpm install
2525

26-
- name: Create Release Pull Request or Publish
27-
id: changesets
28-
uses: changesets/action@v1
29-
with:
30-
commit: "chore(release): version package"
31-
title: "chore(release): version package"
32-
publish: pnpm release:registry
33-
env:
34-
JSREPO_TOKEN: ${{ secrets.JSREPO_TOKEN }}
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
NODE_ENV: production
26+
- name: SvelteKit Sync
27+
run: pnpm sync
28+
29+
- name: Create Release Pull Request or Publish
30+
id: changesets
31+
uses: changesets/action@v1
32+
with:
33+
commit: 'chore(release): version package'
34+
title: 'chore(release): version package'
35+
publish: pnpm release:registry
36+
env:
37+
JSREPO_TOKEN: ${{ secrets.JSREPO_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NODE_ENV: production

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Within is an example of a big red button to help demonstrate how jsrepo works.
66

77
### Relevant Links
88

9-
- [jsrepo](https://github.com/jsrepojs/jsrepo)
10-
- [jsrepo.com](https://jsrepo.com)
9+
- [jsrepo](https://github.com/jsrepojs/jsrepo)
10+
- [jsrepo.com](https://jsrepo.com)
1111

1212
### Prerequisites
1313

14-
- Have an account on [jsrepo.com](https://jsrepo.com)
14+
- Have an account on [jsrepo.com](https://jsrepo.com)
1515

1616
## Tutorial
1717

@@ -75,7 +75,7 @@ Start by running the init command:
7575
pnpm dlx jsrepo init --registry
7676
```
7777

78-
When asked _"Where are your blocks located?"_ answer `./src/lib` and then add another called `./src/lib/components` these directories are where our categories are.
78+
When asked _"Where are your blocks located?"_ answer `./src/lib` and then add another called `./src/lib/components` these directories are where our categories are.
7979

8080
Answer yes to _"Configure to publish to jsrepo.com?"_ and then input the name of your registry.
8181

@@ -225,7 +225,7 @@ Now when we list our blocks only `big-red-button` will appear.
225225
"homepage": "https://github.com/jsrepojs/example-svelte",
226226
"repository": "https://github.com/jsrepojs/example-svelte",
227227
"tags": ["registry", "svelte", "example", "jsrepo"]
228-
},
228+
}
229229
// -- snip --
230230
}
231231
```
@@ -283,6 +283,7 @@ Finally let's create a workflow so that we can publish a new version of our regi
283283
> If you are publishing from a workflow make sure to create a token [here](https://jsrepo.com/account/access-tokens/new) and add it with the name `JSREPO_TOKEN` under `Settings / Secrets and variables / Actions`
284284
285285
`.github/workflows/publish.yml`
286+
286287
```yaml
287288
name: Publish
288289

@@ -309,6 +310,9 @@ jobs:
309310
- name: Install dependencies
310311
run: pnpm install
311312

313+
- name: SvelteKit Sync
314+
run: pnpm sync
315+
312316
- name: Create Release Pull Request or Publish
313317
id: changesets
314318
uses: changesets/action@v1
@@ -323,6 +327,7 @@ jobs:
323327
```
324328
325329
Now lets create a changeset:
330+
326331
```sh
327332
pnpm changeset
328333
```

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1313
"format": "prettier --write .",
1414
"lint": "prettier --check . && eslint .",
15-
"release:registry": "jsrepo publish"
15+
"release:registry": "jsrepo publish && changeset tag"
1616
},
1717
"devDependencies": {
1818
"@changesets/cli": "^2.29.3",
@@ -46,4 +46,4 @@
4646
"esbuild"
4747
]
4848
}
49-
}
49+
}

0 commit comments

Comments
 (0)