Skip to content

Commit

Permalink
automatically publish to npm (#2)
Browse files Browse the repository at this point in the history
enable the action to automatically publish the package to npm registry
  • Loading branch information
hivivo committed Jul 3, 2023
1 parent 83ee22b commit 54f92fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ jobs:
# when merge to main and not a fork
if: github.repository == 'hivivo/windows-reg' && github.event_name == 'push'
permissions:
# for version bump
# for auto version bump
contents: write
# # for package release
# packages: write
runs-on: ubuntu-latest

steps:
Expand All @@ -57,6 +55,8 @@ jobs:
with:
node-version: 18
cache: yarn
# required by yarn publish
registry-url: "https://registry.npmjs.org"

- name: Download artifact
uses: actions/download-artifact@v3
Expand All @@ -68,8 +68,7 @@ jobs:
with:
tag-prefix: 'v'

# TODO: uncomment it when npm is wired
# - name: Release
# run: yarn publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release to NPM registry
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "windows-reg",
"version": "0.1.2",
"description": "Access Windows registry with REG commandline tool",
"description": "Access Windows registry with REG command line tool",
"type": "module",
"repository": "https://github.com/hivivo/windows-reg.git",
"author": "Vivo Xu <git@vivoxu.com>",
Expand Down

0 comments on commit 54f92fc

Please sign in to comment.