Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable release-please & add it to CI #1155

Merged
merged 6 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,35 @@ jobs:
with:
name: nwaku-master-logs
path: packages/tests/log/

maybe-release:
name: release
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: [check, proto, browser, node]
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
monorepo-tags: true

- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}

- uses: actions/setup-node@v3
if: ${{ steps.release.outputs.release_created }}
with:
node-version: ${{ env.NODE_JS }}
registry-url: "https://registry.npmjs.org"

- run: npm install
if: ${{ steps.release.outputs.release_created }}

- run: npm run build
if: ${{ steps.release.outputs.release_created }}

- run: npm publish --workspaces --next --access public
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 11 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed as starting point to create next versions. Description

"packages/utils": "0.0.1",
"packages/proto": "0.0.2",
"packages/interfaces": "0.0.7",
"packages/enr": "0.0.5",
"packages/peer-exchange": "0.0.3",
"packages/core": "0.0.10",
"packages/dns-discovery": "0.0.5",
"packages/message-encryption": "0.0.9",
"packages/create": "0.0.6"
}
20 changes: 20 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"bootstrap-sha": "13183350fac680be8c0e89ca3dc3951330b8b7c0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally defined properties with default valued because they might be used by someone later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw it is a hash of a commit (not including) from which it will make next release

"plugins": ["node-workspace", "sentence-case"],
"release-type": "node",
"separate-pull-requests": false,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"group-pull-request-title-pattern": "chore: release ${branch}",
"packages": {
"packages/utils": {},
"packages/proto": {},
"packages/interfaces": {},
"packages/enr": {},
"packages/peer-exchange": {},
"packages/core": {},
"packages/dns-discovery": {},
"packages/message-encryption": {},
"packages/create": {}
}
}