Skip to content

Commit

Permalink
update changeset to do npm publish
Browse files Browse the repository at this point in the history
updated development instructions
remove changelog
  • Loading branch information
oveddan committed Jun 29, 2023
1 parent dcd0279 commit 007f523
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 19 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- name: Install project dependencies
run: yarn

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 0 additions & 7 deletions CHANGELOG.md

This file was deleted.

25 changes: 13 additions & 12 deletions DEPLOYING.md → DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# Deploying to a new chain
# Development/Deploying workflow

## Development workflow

1. Open a PR with changes
2. Run `npx changeset` to generate a new changeset
3. If changes are approved and merged, a github action will open a PR "Version Packages" and create a corresponding branch `changeset-release/changeset`
4. If a deployment of the contracts should to be done that would affect the deployed contract addresses, checkout the branch `changeset-release/changeset`,
*follow the deployment steps below,* commit changes, and push that branch, which will contain the updated deployed addresses.
5. Merge the PR "Version Packages" to master, which will trigger a github action to publish the new packages to npm.

## Deploying to a new chain

### 1. Setup `chainConfigs` file.

Expand Down Expand Up @@ -38,14 +49,4 @@ Use your own RPC configuration variables

Copies new addresses over to `addresses` folder:

node js-scripts/copy-latest-deployment-addresses.mjs deploy

### 4. Published abis and new addresses node package.

Create a new changeset relase:

yarn changeset

Then publish the new package:

yarn publish
node js-scripts/copy-latest-deployment-addresses.mjs deploy

0 comments on commit 007f523

Please sign in to comment.