From c16e10004a5d9f3071f9bfe833e3888851fe4202 Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Tue, 28 Feb 2023 12:10:25 -0800 Subject: [PATCH] fix: reconfigure release-please (#230) --- .github/release-please-config.json | 4 -- .github/release-please-manifest.json | 10 +++- .github/workflows/release.yml | 85 +++++----------------------- packages/client/package.json | 8 +-- packages/core/package.json | 4 +- packages/principal/package.json | 2 +- packages/server/package.json | 12 ++-- packages/transport/package.json | 6 +- packages/validator/package.json | 8 +-- pnpm-lock.yaml | 40 ++++++------- 10 files changed, 64 insertions(+), 115 deletions(-) diff --git a/.github/release-please-config.json b/.github/release-please-config.json index 522bbba8..e75487b7 100644 --- a/.github/release-please-config.json +++ b/.github/release-please-config.json @@ -1,8 +1,4 @@ { - "plugins": [ - "node-workspace" - ], - "bootstrap-sha": "f0b9ca99ed02a05fa7027c3d5fdc25faae30fcdd", "packages": { "packages/principal": {}, "packages/client": {}, diff --git a/.github/release-please-manifest.json b/.github/release-please-manifest.json index a6b95740..aca77295 100644 --- a/.github/release-please-manifest.json +++ b/.github/release-please-manifest.json @@ -1 +1,9 @@ -{"packages/client":"4.2.3","packages/core":"4.2.3","packages/interface":"4.2.3","packages/principal":"4.2.3","packages/server":"4.2.3","packages/transport":"4.2.3","packages/validator":"4.2.3"} \ No newline at end of file +{ + "packages/client": "4.2.3", + "packages/core": "4.2.3", + "packages/interface": "4.2.3", + "packages/principal": "4.2.3", + "packages/server": "4.2.3", + "packages/transport": "4.2.3", + "packages/validator": "4.2.3" +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a891f78..489b4e6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,104 +7,49 @@ on: - main jobs: - release-please: - name: Release Please + release: + name: Release runs-on: ubuntu-latest outputs: releases_created: ${{ steps.release-please.outputs.releases_created }} steps: - name: Running Release Please - uses: google-github-actions/release-please-action@v2 - id: release-please + uses: google-github-actions/release-please-action@v3 + id: release with: command: manifest token: ${{secrets.GITHUB_TOKEN}} default-branch: main config-file: .github/release-please-config.json manifest-file: .github/release-please-manifest.json + release-type: node + publish: + name: Publish + needs: release + if: ${{steps.release.outputs.releases_created}} + steps: # The logic below handles the npm publication: - name: Checkout - uses: actions/checkout@v2 - # these if statements ensure that a publication only occurs when - # a new release is created: - if: ${{ steps.release-please.outputs.releases_created }} + uses: actions/checkout@v3 - name: Setup - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 16 registry-url: https://registry.npmjs.org/ - if: ${{ steps.release-please.outputs.releases_created }} + cache: 'pnpm' - - name: Install dependencies - uses: pnpm/action-setup@v2.0.1 - id: pnpm-install + - name: Install + uses: pnpm/action-setup@v2.2.3 with: version: 7 - run_install: true - if: ${{ steps.release-please.outputs.releases_created }} - - - name: Test - run: pnpm run --if-present test:node - if: ${{ steps.release-please.outputs.releases_created }} - name: Build run: pnpm run --if-present build - if: ${{ steps.release-please.outputs.releases_created }} - name: Publish - if: ${{ steps.release-please.outputs.releases_created }} env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: | pnpm -r publish --access=public - - update-pull-request: - name: Update pull request - runs-on: ubuntu-latest - needs: release-please - if: needs.release-please.outputs.releases_created != 'true' - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: release-please/branches/main - fetch-depth: 2 - - - name: Setup - uses: actions/setup-node@v2 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - - name: Setup pnpm - uses: pnpm/action-setup@v2.0.1 - id: pnpm-install - with: - version: 7 - run_install: false - - - name: Updating pnpm-lock.yml file - run: pnpm install --lockfile-only - - - name: Merging changes with last commit - run: | - git reset --soft HEAD~1 - git add . - - - name: Updating pull request - uses: googleapis/code-suggester@v2 - env: - ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - command: pr - upstream_owner: ${{ github.repository_owner }} - upstream_repo: ${{ github.event.repository.name }} - description: '🚢 release ucanto' - title: 'chore: release ucanto' - message: 'chore: release ucanto' - branch: release-please/branches/main - primary: main - force: true - fork: false diff --git a/packages/client/package.json b/packages/client/package.json index 5040dd74..ea5bf4a4 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -29,15 +29,15 @@ "build": "tsc --build" }, "dependencies": { - "@ucanto/interface": "^4.2.3", + "@ucanto/interface": "workspace:^", "multiformats": "^11.0.0" }, "devDependencies": { "@types/chai": "^4.3.3", "@types/mocha": "^9.1.0", - "@ucanto/principal": "^4.2.3", - "@ucanto/core": "^4.2.3", - "@ucanto/transport": "^4.2.3", + "@ucanto/core": "workspace:^", + "@ucanto/principal": "workspace:^", + "@ucanto/transport": "workspace:^", "@web-std/fetch": "^4.1.0", "@web-std/file": "^3.0.2", "c8": "^7.11.0", diff --git a/packages/core/package.json b/packages/core/package.json index 908864c1..e7df4749 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -32,13 +32,13 @@ "@ipld/car": "^5.0.3", "@ipld/dag-cbor": "^9.0.0", "@ipld/dag-ucan": "^3.2.0", - "@ucanto/interface": "^4.2.3", + "@ucanto/interface": "workspace:^", "multiformats": "^11.0.0" }, "devDependencies": { "@types/chai": "^4.3.3", "@types/mocha": "^9.1.0", - "@ucanto/principal": "^4.2.3", + "@ucanto/principal": "workspace:^", "c8": "^7.11.0", "chai": "^4.3.6", "mocha": "^10.1.0", diff --git a/packages/principal/package.json b/packages/principal/package.json index 7039e722..d391c065 100644 --- a/packages/principal/package.json +++ b/packages/principal/package.json @@ -29,7 +29,7 @@ "dependencies": { "@ipld/dag-ucan": "^3.2.0", "@noble/ed25519": "^1.7.1", - "@ucanto/interface": "^4.2.3", + "@ucanto/interface": "workspace:^", "multiformats": "^11.0.0", "one-webcrypto": "^1.0.3" }, diff --git a/packages/server/package.json b/packages/server/package.json index b2da35a2..3d60c93f 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -28,17 +28,17 @@ "build": "tsc --build" }, "dependencies": { - "@ucanto/core": "^4.2.3", - "@ucanto/interface": "^4.2.3", - "@ucanto/validator": "^4.2.3" + "@ucanto/core": "workspace:^", + "@ucanto/interface": "workspace:^", + "@ucanto/validator": "workspace:^" }, "devDependencies": { "@types/chai": "^4.3.3", "@types/chai-subset": "^1.3.3", "@types/mocha": "^9.1.0", - "@ucanto/principal": "^4.2.3", - "@ucanto/client": "^4.2.3", - "@ucanto/transport": "^4.2.3", + "@ucanto/client": "workspace:^", + "@ucanto/principal": "workspace:^", + "@ucanto/transport": "workspace:^", "@web-std/fetch": "^4.1.0", "@web-std/file": "^3.0.2", "c8": "^7.11.0", diff --git a/packages/transport/package.json b/packages/transport/package.json index e0cf1e0b..f53b612e 100644 --- a/packages/transport/package.json +++ b/packages/transport/package.json @@ -31,14 +31,14 @@ "dependencies": { "@ipld/car": "^5.0.3", "@ipld/dag-cbor": "^9.0.0", - "@ucanto/core": "^4.2.3", - "@ucanto/interface": "^4.2.3", + "@ucanto/core": "workspace:^", + "@ucanto/interface": "workspace:^", "multiformats": "^11.0.0" }, "devDependencies": { "@types/chai": "^4.3.3", "@types/mocha": "^9.1.0", - "@ucanto/principal": "^4.2.3", + "@ucanto/principal": "workspace:^", "@web-std/fetch": "^4.1.0", "c8": "^7.11.0", "chai": "^4.3.6", diff --git a/packages/validator/package.json b/packages/validator/package.json index 54042c82..5db74d00 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -29,16 +29,16 @@ "dependencies": { "@ipld/car": "^5.0.3", "@ipld/dag-cbor": "^8.0.0", - "@ucanto/core": "^4.2.3", - "@ucanto/interface": "^4.2.3", + "@ucanto/core": "workspace:^", + "@ucanto/interface": "workspace:^", "multiformats": "^11.0.0" }, "devDependencies": { "@types/chai": "^4.3.3", "@types/chai-subset": "^1.3.3", "@types/mocha": "^9.1.0", - "@ucanto/client": "^4.2.3", - "@ucanto/principal": "^4.2.3", + "@ucanto/client": "workspace:^", + "@ucanto/principal": "workspace:^", "c8": "^7.11.0", "chai": "^4.3.6", "chai-subset": "^1.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 85e7d884..dc77b2cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,10 +16,10 @@ importers: specifiers: '@types/chai': ^4.3.3 '@types/mocha': ^9.1.0 - '@ucanto/core': ^4.2.3 - '@ucanto/interface': ^4.2.3 - '@ucanto/principal': ^4.2.3 - '@ucanto/transport': ^4.2.3 + '@ucanto/core': workspace:^ + '@ucanto/interface': workspace:^ + '@ucanto/principal': workspace:^ + '@ucanto/transport': workspace:^ '@web-std/fetch': ^4.1.0 '@web-std/file': ^3.0.2 c8: ^7.11.0 @@ -54,8 +54,8 @@ importers: '@ipld/dag-ucan': ^3.2.0 '@types/chai': ^4.3.3 '@types/mocha': ^9.1.0 - '@ucanto/interface': ^4.2.3 - '@ucanto/principal': ^4.2.3 + '@ucanto/interface': workspace:^ + '@ucanto/principal': workspace:^ c8: ^7.11.0 chai: ^4.3.6 mocha: ^10.1.0 @@ -97,7 +97,7 @@ importers: '@noble/ed25519': ^1.7.1 '@types/chai': ^4.3.3 '@types/mocha': ^9.1.0 - '@ucanto/interface': ^4.2.3 + '@ucanto/interface': workspace:^ c8: ^7.11.0 chai: ^4.3.6 mocha: ^10.1.0 @@ -127,12 +127,12 @@ importers: '@types/chai': ^4.3.3 '@types/chai-subset': ^1.3.3 '@types/mocha': ^9.1.0 - '@ucanto/client': ^4.2.3 - '@ucanto/core': ^4.2.3 - '@ucanto/interface': ^4.2.3 - '@ucanto/principal': ^4.2.3 - '@ucanto/transport': ^4.2.3 - '@ucanto/validator': ^4.2.3 + '@ucanto/client': workspace:^ + '@ucanto/core': workspace:^ + '@ucanto/interface': workspace:^ + '@ucanto/principal': workspace:^ + '@ucanto/transport': workspace:^ + '@ucanto/validator': workspace:^ '@web-std/fetch': ^4.1.0 '@web-std/file': ^3.0.2 c8: ^7.11.0 @@ -171,9 +171,9 @@ importers: '@ipld/dag-cbor': ^9.0.0 '@types/chai': ^4.3.3 '@types/mocha': ^9.1.0 - '@ucanto/core': ^4.2.3 - '@ucanto/interface': ^4.2.3 - '@ucanto/principal': ^4.2.3 + '@ucanto/core': workspace:^ + '@ucanto/interface': workspace:^ + '@ucanto/principal': workspace:^ '@web-std/fetch': ^4.1.0 c8: ^7.11.0 chai: ^4.3.6 @@ -207,10 +207,10 @@ importers: '@types/chai': ^4.3.3 '@types/chai-subset': ^1.3.3 '@types/mocha': ^9.1.0 - '@ucanto/client': ^4.2.3 - '@ucanto/core': ^4.2.3 - '@ucanto/interface': ^4.2.3 - '@ucanto/principal': ^4.2.3 + '@ucanto/client': workspace:^ + '@ucanto/core': workspace:^ + '@ucanto/interface': workspace:^ + '@ucanto/principal': workspace:^ c8: ^7.11.0 chai: ^4.3.6 chai-subset: ^1.6.0