diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..e5b6d8d6 --- /dev/null +++ b/.changeset/README.md @@ -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) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..fce1c265 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..45aa173c --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/package.json b/package.json index c155e03c..9d677a97 100644 --- a/package.json +++ b/package.json @@ -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": "yarn@4.0.2" }