Skip to content

Commit

Permalink
feat: Also release on Github
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnns committed Nov 10, 2024
1 parent 93d6119 commit 0e3e84f
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@main
uses: actions/checkout@3b9b8c884f6b4bb4d5be2779c26374abadae0871 # pin@main
- name: ⎔ Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # pin@main
with:
Expand All @@ -49,5 +49,6 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

run: |
npm run release
11 changes: 10 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
}
],
"@semantic-release/github",
"@semantic-release/npm"
"@semantic-release/npm",
[
"@semantic-release/exec",
{
"verifyConditionsCmd": "echo //npm.pkg.github.com/:_authToken=${process.env.GITHUB_TOKEN} > temp.npmrc && npm whoami --userconfig temp.npmrc --registry https://npm.pkg.github.com/",
"publishCmd": "npm publish --userconfig temp.npmrc --tag ${nextRelease.channel} --registry https://npm.pkg.github.com/ --no-git-tag-version",
"successCmd": "rm temp.npmrc",
"failCmd": "rm temp.npmrc"
}
]
]
}
86 changes: 63 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/eslint-config-prettier": "^6.11.3",
"@types/eslint-plugin-jsx-a11y": "^6.9.0",
Expand Down

0 comments on commit 0e3e84f

Please sign in to comment.