From d5615f597f47b060ebd79fc6fc39b5122b2ad279 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Tue, 7 Jan 2025 17:41:24 +0800 Subject: [PATCH] revert changeset changes --- .changeset/clever-rings-lick.md | 5 --- .changeset/pre.json | 12 ----- .github/workflows/publish.yml | 2 +- .github/workflows/release.yml | 78 ++++++++++++++++++--------------- package.json | 1 + packages/ensjs/CHANGELOG.md | 6 --- packages/ensjs/package.json | 2 +- packages/react/CHANGELOG.md | 7 --- packages/react/package.json | 2 +- 9 files changed, 46 insertions(+), 69 deletions(-) delete mode 100644 .changeset/clever-rings-lick.md delete mode 100644 .changeset/pre.json diff --git a/.changeset/clever-rings-lick.md b/.changeset/clever-rings-lick.md deleted file mode 100644 index 33d280de..00000000 --- a/.changeset/clever-rings-lick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@ensdomains/ensjs': minor ---- - -Add legacy commit and registration functions diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index be4c14b0..00000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "mode": "pre", - "tag": "next", - "initialVersions": { - "@ensdomains/ens-test-env": "0.5.0-beta.1", - "@ensdomains/ensjs": "4.0.2", - "@ensdomains/ensjs-react": "0.0.4" - }, - "changesets": [ - "clever-rings-lick" - ] -} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d1355fb9..7d5af147 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -51,7 +51,7 @@ jobs: with: # Note: pnpm install after versioning is necessary to refresh lockfile version: pnpm chgset:version - publish: pnpm release --no-git-checks + publish: pnpm release commit: "chore: release" title: "[ci] release" env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3aadad4..76266583 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,55 +1,61 @@ -name: Release +name: Prerelease on: release: types: [published] +name: Release + +defaults: + run: + shell: bash + +env: + FORCE_COLOR: true + jobs: - release: - name: Release + changelog: + name: PR or Release + if: ${{ github.repository_owner == 'ensdomains' }} + runs-on: ubuntu-latest permissions: - id-token: write contents: write - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18] + id-token: write + pull-requests: write steps: - uses: actions/checkout@v4 - with: - ref: ${{ github.event.release.target_commitish }} - - uses: pnpm/action-setup@v4 - with: - version: 9.4.0 + - uses: actions/checkout@v4 + - name: Enable corepack + run: corepack enable pnpm - - name: Install Node.js - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} cache: 'pnpm' + node-version: 18 + registry-url: 'https://registry.npmjs.org' - - run: pnpm install --frozen-lockfile + - name: Install dependencies + run: pnpm install - - name: Set up git - run: | - git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com' - git config --local user.name 'github-actions[bot]' + - name: Build Packages + run: pnpm -r build - - name: Bump version to ${{ github.event.release.tag_name }} - run: | - pnpm -F @ensdomains/ensjs ver ${{ github.event.release.tag_name }} - git add . - git commit -m "${{ github.event.release.tag_name }}" - - - name: Publish + - name: Fix npmrc + run: npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true - run: | - pnpm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} - pnpm -F @ensdomains/ensjs publish --no-git-checks + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Push changes - run: git push + - name: Create Release Pull Request or Publish + id: changesets + uses: changesets/action@v1 + with: + # Note: pnpm install after versioning is necessary to refresh lockfile + version: pnpm chgset:version:prerelease + publish: pnpm release --no-git-checks + commit: "chore: release" + title: "[ci] release" env: - github-token: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Needs access to publish to npm + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: true diff --git a/package.json b/package.json index 23c342c3..52198bd5 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "publish:local:ens-test-env": "yalc publish packages/ens-test-env --push --up", "publish:local:ensjs": "yalc publish packages/ensjs --push --up", "chgset:version": "changeset version && pnpm install", + "chgset:version:prerelease": "changeset pre enter next && pnpm chgset:version", "chgset:run": "changeset", "release": "pnpm publish -r --access public && changeset tag", "chgset": "pnpm chgset:run && pnpm chgset:version" diff --git a/packages/ensjs/CHANGELOG.md b/packages/ensjs/CHANGELOG.md index a5379d6b..4627c491 100644 --- a/packages/ensjs/CHANGELOG.md +++ b/packages/ensjs/CHANGELOG.md @@ -1,11 +1,5 @@ # @ensdomains/ensjs -## 4.1.0-next.0 - -### Minor Changes - -- [#220](https://github.com/ensdomains/ensjs/pull/220) [`d548d95`](https://github.com/ensdomains/ensjs/commit/d548d9555741b6d9a99b1e2ec3c20eaca7a186f6) Thanks [@storywithoutend](https://github.com/storywithoutend)! - Add legacy commit and registration functions - ## 4.0.2 ### Patch Changes diff --git a/packages/ensjs/package.json b/packages/ensjs/package.json index 0e63e509..a119e637 100644 --- a/packages/ensjs/package.json +++ b/packages/ensjs/package.json @@ -1,6 +1,6 @@ { "name": "@ensdomains/ensjs", - "version": "4.1.0-next.0", + "version": "4.0.2", "description": "ENS javascript library for contract interaction", "type": "module", "main": "./dist/cjs/index.js", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index e91ff71f..80aa6881 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,12 +1,5 @@ # @ensdomains/ensjs-react -## 0.0.5-next.0 - -### Patch Changes - -- Updated dependencies [[`d548d95`](https://github.com/ensdomains/ensjs/commit/d548d9555741b6d9a99b1e2ec3c20eaca7a186f6)]: - - @ensdomains/ensjs@4.1.0-next.0 - ## 0.0.4 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index b3167622..c89cb091 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@ensdomains/ensjs-react", - "version": "0.0.5-next.0", + "version": "0.0.4", "description": "ENS javascript library for contract interaction", "type": "module", "main": "./dist/cjs/index.js",