Skip to content

Commit

Permalink
fix: reconfigure release-please (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozala authored Feb 28, 2023
1 parent 9bbb2f7 commit c16e100
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 115 deletions.
4 changes: 0 additions & 4 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"plugins": [
"node-workspace"
],
"bootstrap-sha": "f0b9ca99ed02a05fa7027c3d5fdc25faae30fcdd",
"packages": {
"packages/principal": {},
"packages/client": {},
Expand Down
10 changes: 9 additions & 1 deletion .github/release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -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"}
{
"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"
}
85 changes: 15 additions & 70 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/principal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
12 changes: 6 additions & 6 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions packages/transport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions packages/validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
40 changes: 20 additions & 20 deletions pnpm-lock.yaml

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

0 comments on commit c16e100

Please sign in to comment.