Skip to content

Commit

Permalink
🔧 chore(npm-publish-packages.yml): update actions/checkout version to…
Browse files Browse the repository at this point in the history
… v3 for better compatibility and reliability

🔧 chore(npm-publish-packages.yml): update actions/setup-node version to v3 for better compatibility and reliability
🔧 chore(npm-publish-packages.yml): remove unnecessary steps and simplify the workflow
🔧 chore(npm-publish-packages.yml): update publish command to use yarn and add --access public flag for publishing packages with public access
🔧 chore(npm-publish-packages.yml): update environment variable name from NPM_AUTH_TOKEN to NODE_AUTH_TOKEN for consistency
  • Loading branch information
alisaitteke committed Dec 21, 2023
1 parent f4f3613 commit aa7b6fa
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/npm-publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
Expand All @@ -24,17 +24,11 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Publish if version has been updated
uses: pascalgn/[email protected]
with: # All of theses inputs are optional
tag_name: "v%s"
tag_message: "v%s"
create_tag: "true"
# commit_pattern: "^Release (\\S+)"
workspace: "."
publish_command: "yarn"
publish_args: "--non-interactive"
env: # More info about the environment variables in the README
GITHUB_TOKEN: ${{ secrets.GITH_PACKAGE_TOKEN }} # Leave this as is, it's automatically generated
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # You need to set this in your repo settings
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit aa7b6fa

Please sign in to comment.