Skip to content

Commit

Permalink
Merge pull request #6 from hyperlane-xyz/changesets
Browse files Browse the repository at this point in the history
Set up changesets
  • Loading branch information
jmrossy authored Apr 9, 2024
2 parents 888a029 + 5014d6c commit 44b257e
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

jobs:
release:
permissions:
id-token: write
contents: write
pull-requests: write
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install Dependencies
run: yarn install --no-immutable

- name: Create Release PR or Publish to NPM
id: changesets
uses: changesets/action@v1
with:
version: yarn version:prepare
publish: yarn release
env:
NPM_CONFIG_PROVENANCE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
"build": "tsx ./scripts/build.ts && tsc",
"prettier": "prettier --write ./chains ./deployments",
"test": "yarn build && mocha --config .mocharc.json './test/**/*.test.ts' --exit",
"prepare": "husky"
"prepare": "husky",
"release": "yarn build && yarn changeset publish",
"version:prepare": "yarn changeset version && yarn install --no-immutable",
"version:check": "yarn changeset status"
},
"packageManager": "[email protected]"
}

0 comments on commit 44b257e

Please sign in to comment.