diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 305e404ec3..a576962210 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000000..3806418880 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,11 @@ +{ + "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" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000000..213fc1d3b1 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,19 @@ +{ + "bootstrap-sha": "13183350fac680be8c0e89ca3dc3951330b8b7c0", + "plugins": ["node-workspace", "sentence-case"], + "release-type": "node", + "separate-pull-requests": false, + "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": {} + } +}