Skip to content

Commit 8f62574

Browse files
authored
ci: enable NPM_TOKEN for releasing automatically (#494)
1 parent 3faa3e2 commit 8f62574

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ jobs:
2929
- name: Build
3030
run: yarn build
3131

32-
- name: Create Release Pull Request
32+
- name: Create Release Pull Request or Publish to npm
3333
id: changesets
3434
uses: changesets/action@v1
3535
with:
36+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
37+
publish: yarn release:only
3638
commit: 'chore: release package(s)'
3739
title: 'chore: release package(s)'
3840
env:
3941
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"prelint": "yarn build",
2222
"prepare": "patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
2323
"prerelease": "yarn build",
24-
"release": "changeset publish",
24+
"release": "yarn release:only",
25+
"release:only": "changeset publish",
2526
"test": "jest",
2627
"typecov": "type-coverage"
2728
},

0 commit comments

Comments
 (0)