Skip to content

Commit

Permalink
ci: update the version packages (#488)
Browse files Browse the repository at this point in the history
* Version Packages

* Add npmrc & remove root from manually updating

* Add npmrc & remove root from manually updating

* update nx version

* Fix the publish command

* Add command to update the lockfile

* Specify the shell

* Check current branch

* Specify the shell

* Check the current branch

* Fix syntax err

* Check the current branch

* Check the current branch

* Check the current branch

* Check the current branch

* Update the lock file via ci

* Update the readme file

* Move the step that updates the lock file to the version.yml workflow

* Move the step that updates the lock file to the version-snapshot.yml workflow

---------

Co-authored-by: svc-gh-is-01 <[email protected]>
Co-authored-by: tirumerla <[email protected]>
Co-authored-by: collins-w <[email protected]>
  • Loading branch information
4 people authored Jul 23, 2024
1 parent 19cd7a9 commit 4aaf7b8
Show file tree
Hide file tree
Showing 88 changed files with 626 additions and 1,055 deletions.
44 changes: 0 additions & 44 deletions .changeset/strange-squids-turn.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ runs:
with:
version: 9
run_install: false

- name: Use node@20
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.11.1
cache: 'pnpm'

- name: Install dependencies
run: |
pnpm install-deps
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/version-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,12 @@ jobs:
title: "ci: update the version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update the lock file
run: pnpm install --lockfile-only
shell: bash

- name: Commit lock file
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update lock file"
9 changes: 9 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,12 @@ jobs:
title: "ci: update the version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update the lock file
run: pnpm install --lockfile-only
shell: bash

- name: Commit lock file
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update lock file"
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
engine-strict=true # https://pnpm.io/npmrc#engine-strict
auto-install-peers=true # https://pnpm.io/npmrc#auto-install-peers
link-workspace-packages=true # https://pnpm.io/npmrc#link-workspace-packages
prefer-workspace-packages=true # https://pnpm.io/npmrc#prefer-workspace-packages
include-workspace-root=true # https://pnpm.io/npmrc#include-workspace-root
24 changes: 0 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,6 @@ DEFENDER_RELAY_SIGNER_POOL_CLIENT_ID=

---

### CI/CD

- Run `npx changeset` to select specific packages to bump ( use up & down arrows to navigate, space to select specific packages). This will create a new changeset file in `./changesets` folder. Update changelog in changeset file if needed using `feat:`, `fix:`, `docs:`, `chore:` or `refactor:` prefixes.
- Create a PR with changeset file.
- After the PR is approved & merged. Changeset bot will automatically create a PR deleting the changeset file and bumping the package version & updates changelog. This PR will not automatically update the package version/dependencies in `package.json` file. You will have to manually push the change to this PR updating package version/version of `@openzeppelin/defender-sdk-base-client` in `package.json` file and run `pnpm i --ignore-scripts --prefer-offline` to make sure pnpm lock file is updated.
- After the PR is approved & merged make sure to run build & tests using `pnpm nx-build-skip-cache` && `pnpm nx-test-skip-cache`.
- After the tests passes run `npx changeset publish` this publishes the packages to npm. Or use the workflow dispatch(publish.yml) to trigger the publish using the CI.
- Finally push tags ( make sure you are signing tags before pushing ) to git `git push --follow-tags`. (This step is not needed if publishing using the CI as the the tags will be pushed automatically).

## Snapshot Release

- Checkout from the main branch(with changeset file) to a branch prefixed by `snapshot`.
- Raise a PR to target the snapshot branch.
- Merge the PR to the snapshot branch.
- After the PR is merged, another PR will be created that removes the changeset file and bumps the packages versions. Manually push a change to this PR updating package version of `@openzeppelin/defender-sdk-base-client` in `package.json` file and run `pnpm i --ignore-scripts --prefer-offline` to make sure pnpm lock file is updated.
- After the above PR has been merged, manually trigger the snapshot workflow, `publish-snapshot.yml`, to release the snapshot.

<!-- TODO: once we have CI/CD steps fully defined we should validate this is accurate -->

- We use github actions for CI/CD. See [workflows](.github/workflows) for more info.
- `ci.yml` - runs on every push to any branch --> runs tests.

---

### Determinstic Builds & Secure Publishes

- We use [slsa framework](https://slsa.dev/) _pronounced "salsa"_ for reproducible builds & secure pushes. Verification is done using [provenance](https://slsa.dev/provenance/v1)
9 changes: 9 additions & 0 deletions examples/create-action/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @openzeppelin/defender-sdk-example-create-action

## 1.14.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk@1.14.2

## 1.14.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/create-action/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/defender-sdk-example-create-action",
"version": "1.14.1",
"version": "1.14.2",
"private": true,
"main": "index.js",
"author": "Nami Shah <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.14.1",
"@openzeppelin/defender-sdk": "1.14.2",
"dotenv": "^16.3.1"
}
}
9 changes: 9 additions & 0 deletions examples/create-batch-proposal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @openzeppelin/defender-sdk-example-create-batch-proposal

## 1.14.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk@1.14.2

## 1.14.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/create-batch-proposal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/defender-sdk-example-create-batch-proposal",
"version": "1.14.1",
"version": "1.14.2",
"private": true,
"main": "index.js",
"author": "Nami Shah <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.14.1",
"@openzeppelin/defender-sdk": "1.14.2",
"dotenv": "^16.3.1"
}
}
9 changes: 9 additions & 0 deletions examples/create-forked-network/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @openzeppelin/defender-sdk-example-create-forked-network

## 1.14.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk@1.14.2

## 1.14.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/create-forked-network/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/defender-sdk-example-create-forked-network",
"version": "1.14.1",
"version": "1.14.2",
"private": true,
"main": "index.js",
"author": "Zeljko Markovic <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.14.1",
"@openzeppelin/defender-sdk": "1.14.2",
"dotenv": "^16.3.1"
}
}
9 changes: 9 additions & 0 deletions examples/create-monitor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @openzeppelin/defender-sdk-example-create-monitor

## 1.1.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk@1.14.2

## 1.1.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/create-monitor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/defender-sdk-example-create-monitor",
"version": "1.1.1",
"version": "1.1.2",
"private": true,
"main": "index.js",
"author": "OpenZeppelin Defender <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.14.1",
"@openzeppelin/defender-sdk": "1.14.2",
"dotenv": "^16.3.1"
}
}
9 changes: 9 additions & 0 deletions examples/create-private-network/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @openzeppelin/defender-sdk-example-create-private-network

## 1.14.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk@1.14.2

## 1.14.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/create-private-network/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/defender-sdk-example-create-private-network",
"version": "1.14.1",
"version": "1.14.2",
"private": true,
"main": "index.js",
"author": "Nami Shah <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.14.1",
"@openzeppelin/defender-sdk": "1.14.2",
"dotenv": "^16.3.1"
}
}
9 changes: 9 additions & 0 deletions examples/create-proposal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @openzeppelin/defender-sdk-example-create-proposal

## 1.14.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk@1.14.2

## 1.14.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/create-proposal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/defender-sdk-example-create-proposal",
"version": "1.14.1",
"version": "1.14.2",
"private": true,
"main": "index.js",
"author": "OpenZeppelin Defender <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.14.1",
"@openzeppelin/defender-sdk": "1.14.2",
"dotenv": "^16.3.1"
}
}
9 changes: 9 additions & 0 deletions examples/create-relayer-key/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# example-create-relayer-key

## 1.14.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk@1.14.2

## 1.14.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/create-relayer-key/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example-create-relayer-key",
"version": "1.14.1",
"version": "1.14.2",
"private": true,
"main": "index.js",
"author": "Dan McKeon <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.14.1",
"@openzeppelin/defender-sdk": "1.14.2",
"dotenv": "^16.3.1"
}
}
9 changes: 9 additions & 0 deletions examples/create-relayer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# example-create-relayer

## 1.14.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk@1.14.2

## 1.14.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/create-relayer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example-create-relayer",
"version": "1.14.1",
"version": "1.14.2",
"private": true,
"main": "index.js",
"author": "Dan McKeon <[email protected]>",
Expand All @@ -9,7 +9,7 @@
"start": "node index.js"
},
"dependencies": {
"@openzeppelin/defender-sdk": "1.14.1",
"@openzeppelin/defender-sdk": "1.14.2",
"dotenv": "^16.3.1"
}
}
10 changes: 10 additions & 0 deletions examples/custom-ethers-pkg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @openzeppelin/defender-sdk-example-rollup

## 1.14.2

### Patch Changes

- 19cd7a9: feat: Add relayers usage limiting
feat: Add an example contract call
- Updated dependencies [19cd7a9]
- @openzeppelin/defender-sdk-action-client@1.14.2
- @openzeppelin/defender-sdk@1.14.2

## 1.14.1

### Patch Changes
Expand Down
Loading

0 comments on commit 4aaf7b8

Please sign in to comment.