-
Notifications
You must be signed in to change notification settings - Fork 131
feat: release on action #922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
||
- name: Package Version Bump | ||
run: | | ||
yarn version ${{ github.event.release.tag_name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refer this for syntax: https://classic.yarnpkg.com/lang/en/docs/cli/version/
yarn version --new-version "${{ github.event.release.tag_name }}"
types: [published] | ||
|
||
env: | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn publish expects a NODE_AUTH_TOKEN, not NPM_TOKEN
Change to:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
permissions: | ||
contents: read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may need to change the permission to write, for commit to work
- name: Set Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add .npmrc to repo or we can add this after line 27:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
@Tekvology action for releasing package with github release method