Skip to content

Commit

Permalink
update release please
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-t-wang committed Oct 25, 2024
1 parent d116ffe commit 73c0da7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 8 deletions.
45 changes: 38 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: New release
name: New Release

on:
push:
Expand All @@ -17,12 +17,13 @@ jobs:
uses: google-github-actions/release-please-action@v3
with:
command: manifest
release-type: node

publish:
publish-npm:
needs: release
name: Publish
name: Publish to npm
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.releases_created }}
if: ${{ needs.release.outputs.releases_created == 'true' }}
steps:
- uses: actions/checkout@v3

Expand All @@ -43,7 +44,37 @@ jobs:
- name: Build
run: pnpm build

- name: Publish
run: pnpm publish -r --report-summary
- name: Publish to npm
run: pnpm publish --report-summary
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-github:
needs: release
name: Publish to GitHub Package Registry
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.releases_created == 'true' }}
steps:
- uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 9

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Publish to GitHub
run: pnpm publish --report-summary
env:
NODE_AUTH_TOKEN: ${{ secrets.GIT_HUB_TOKEN }}
15 changes: 14 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"release-type": "node",
"packages": {
"src": {
"packages/react": {
"component": "react",
"skip-github-release": true
},
"packages/core": {
"component": "core",
"skip-github-release": true
},
".": {
"component": "minikit-js",
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": false,
Expand All @@ -14,6 +22,11 @@
{
"type": "node-workspace",
"merge": false
},
{
"type": "linked-versions",
"groupName": "group",
"components": ["core", "react", "minikit-js"]
}
],
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
Expand Down

0 comments on commit 73c0da7

Please sign in to comment.