Skip to content

Commit

Permalink
ci: enable NPM_TOKEN for releasing automatically (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Dec 21, 2023
1 parent 3faa3e2 commit 8f62574
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ jobs:
- name: Build
run: yarn build

- name: Create Release Pull Request
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release:only
commit: 'chore: release package(s)'
title: 'chore: release package(s)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"prelint": "yarn build",
"prepare": "patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
"prerelease": "yarn build",
"release": "changeset publish",
"release": "yarn release:only",
"release:only": "changeset publish",
"test": "jest",
"typecov": "type-coverage"
},
Expand Down

0 comments on commit 8f62574

Please sign in to comment.