Skip to content

Commit 99abe23

Browse files
committed
ci: better github workflows for npm publish
1 parent b146024 commit 99abe23

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

.changeset/better-phones-melt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"mobx-tanstack-query": patch
3+
---
4+
5+
ci/cd: github workflows

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy typedoc to Pages
1+
name: Deploy docs to Pages
22

33
on:
44
push:

.github/workflows/version-or-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ jobs:
3535
uses: changesets/action@v1
3636
with:
3737
version: pnpm changeset version
38-
publish: pnpm pub
38+
publish: pnpm pub-ci
3939
env:
4040
GITHUB_TOKEN: ${{ github.token }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4142
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# mobx-tanstack-query
22

3-
## 6.0.1
4-
5-
### Patch Changes
6-
7-
- [`beddc88`](https://github.com/js2me/mobx-tanstack-query/commit/beddc886e4822af7671fc2a0838d5087edf87821) Thanks [@js2me](https://github.com/js2me)! - ci: better github workflows for npm publish
8-
93
## 6.0.0
104

115
### Major Changes

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mobx-tanstack-query",
3-
"version": "6.0.1",
3+
"version": "6.0.0",
44
"scripts": {
55
"prepare": "pnpm dev:install-hooks",
66
"clean": "rimraf dist",
@@ -9,6 +9,7 @@
99
"build:watch": "pnpm build && nodemon --watch src --ext ts --exec \"tsc && node ./post-build.mjs\"",
1010
"build": "tsc && node ./post-build.mjs",
1111
"pub": "PUBLISH=true pnpm run build",
12+
"pub-ci": "PUBLISH=true CI=true pnpm run build",
1213
"pub:patch": "PUBLISH=true PUBLISH_VERSION=patch pnpm run build",
1314
"pub:minor": "PUBLISH=true PUBLISH_VERSION=minor pnpm run build",
1415
"pub:major": "PUBLISH=true PUBLISH_VERSION=major pnpm run build",

post-build.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ postBuildScript({
1010
if (process.env.PUBLISH) {
1111
$('pnpm test');
1212

13+
if (!process.env.CI) {
14+
$('pnpm changeset version');
15+
}
16+
1317
publishScript({
1418
nextVersion: versionsDiff?.next ?? packageJson.version,
1519
currVersion: versionsDiff?.current,

0 commit comments

Comments
 (0)