Skip to content

Conversation

bashleigh
Copy link
Collaborator

@Tekvology action for releasing package with github release method


- name: Package Version Bump
run: |
yarn version ${{ github.event.release.tag_name }}

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}}

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

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'

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants