Skip to content

Commit 65f6c25

Browse files
authored
Use changesets for releases (#528)
1 parent e19623a commit 65f6c25

25 files changed

+694
-83
lines changed

.changeset/add-account-contract.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@openzeppelin/wizard': patch
3+
---
4+
5+
Add `account` contract types for ERC-4337. ([#486](https://github.com/OpenZeppelin/contracts-wizard/pull/486))
6+
- **Potentially breaking changes**:
7+
- Update pragma versions to 0.8.27. ([#486](https://github.com/OpenZeppelin/contracts-wizard/pull/486))

.changeset/config.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "OpenZeppelin/contracts-wizard"
7+
}
8+
],
9+
"commit": false,
10+
"fixed": [],
11+
"linked": [],
12+
"access": "public",
13+
"baseBranch": "master",
14+
"updateInternalDependencies": "patch",
15+
"ignore": [
16+
"@openzeppelin/wizard-cairo-alpha",
17+
"ui"
18+
]
19+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openzeppelin/wizard': patch
3+
---
4+
5+
Remove redundant overrides in Governor. ([#522](https://github.com/OpenZeppelin/contracts-wizard/pull/522))

.github/actions/setup/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Setup
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0
7+
with:
8+
node-version: 20.x
9+
cache: yarn
10+
11+
- name: Install dependencies
12+
run: yarn --frozen-lockfile --prefer-offline
13+
shell: bash

.github/workflows/changeset.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Changeset
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
types:
8+
- opened
9+
- synchronize
10+
- labeled
11+
- unlabeled
12+
13+
concurrency:
14+
group: changeset-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
check:
19+
runs-on: ubuntu-latest
20+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-changeset') }}
21+
steps:
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
23+
with:
24+
fetch-depth: 0 # Include history so Changesets finds merge-base
25+
- name: Set up environment
26+
uses: ./.github/actions/setup
27+
- name: Check changeset
28+
run: npx changeset status --since=origin/${{ github.base_ref }}

.github/workflows/compile-cairo-alpha-project.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
1919

2020
- name: Setup node
21-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0
2222
with:
2323
node-version: 20.x
2424
cache: 'yarn'
@@ -34,7 +34,7 @@ jobs:
3434
echo "SCARB_VERSION=$SCARB_VERSION" >> "$GITHUB_ENV"
3535
3636
- name: Setup Scarb
37-
uses: software-mansion/setup-scarb@v1
37+
uses: software-mansion/setup-scarb@f6ad35129872f897bdea556c09e11af8fb3293c0 #v1.5.1
3838
with:
3939
scarb-version: ${{ env.SCARB_VERSION }}
4040

.github/workflows/compile-cairo-project.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
1919

2020
- name: Setup node
21-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0
2222
with:
2323
node-version: 20.x
2424
cache: 'yarn'
@@ -34,7 +34,7 @@ jobs:
3434
echo "SCARB_VERSION=$SCARB_VERSION" >> "$GITHUB_ENV"
3535
3636
- name: Setup Scarb
37-
uses: software-mansion/setup-scarb@v1
37+
uses: software-mansion/setup-scarb@f6ad35129872f897bdea556c09e11af8fb3293c0 #v1.5.1
3838
with:
3939
scarb-version: ${{ env.SCARB_VERSION }}
4040

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Packages
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency: version-or-publish-${{ github.ref }}
7+
8+
jobs:
9+
publish:
10+
name: Publish Packages
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
runs-on: ubuntu-latest
15+
environment: publish
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
18+
with:
19+
fetch-depth: 0 # To get all tags
20+
ref: ${{ github.ref }}
21+
- name: Set up environment
22+
uses: ./.github/actions/setup
23+
- name: Create Prepare Release PR or Publish
24+
id: changesets
25+
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc #v1.4.10
26+
with:
27+
title: Prepare Release
28+
commit: Prepare Release
29+
version: npm run version
30+
publish: npm run publish
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
- name: Check changesets status
35+
if: steps.changesets.outputs.hasChangesets == 'true'
36+
run: |
37+
echo "Changesets found. Merge Prepare Release PR before publishing."
38+
exit 1
39+
- name: Check publish status
40+
if: steps.changesets.outputs.published == 'false'
41+
run: |
42+
echo "Publish failed. Check the logs for more details."
43+
exit 1

.github/workflows/test.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ jobs:
99
format-lint:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: 20.x
16-
cache: 'yarn'
17-
- name: Install dependencies
18-
run: yarn install --network-concurrency 1
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
13+
- name: Set up environment
14+
uses: ./.github/actions/setup
1915
- name: Check formatting
2016
run: yarn format:check
2117
- name: Run linter
@@ -24,17 +20,13 @@ jobs:
2420
deno-check:
2521
runs-on: ubuntu-latest
2622
steps:
27-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
2824
- name: Set up Deno 1.46.3 (matching Netlify edge function environment)
29-
uses: denoland/setup-deno@v2
25+
uses: denoland/setup-deno@909cc5acb0fdd60627fb858598759246509fa755 #v2.0.2
3026
with:
3127
deno-version: '1.46.3'
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version: 20.x
35-
cache: 'yarn'
36-
- name: Install dependencies and build wizard packages
37-
run: yarn install --frozen-lockfile
28+
- name: Set up environment
29+
uses: ./.github/actions/setup
3830
- name: Deno check API
3931
run: yarn type:check:api
4032

@@ -49,16 +41,12 @@ jobs:
4941

5042
runs-on: ubuntu-latest
5143
steps:
52-
- uses: actions/checkout@v4
53-
- uses: actions/setup-node@v4
54-
with:
55-
node-version: 20.x
56-
cache: 'yarn'
44+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
45+
- name: Set up environment
46+
uses: ./.github/actions/setup
5747
- name: Install Foundry
5848
if: matrix.package == 'solidity'
59-
uses: foundry-rs/foundry-toolchain@v1
60-
- name: Install dependencies
61-
run: yarn install
49+
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de #v1.4.0
6250
- name: Compile TypeScript
6351
run: yarn tsc
6452
working-directory: packages/core/${{matrix.package}}

.github/workflows/version.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Version Packages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency: version-or-publish-${{ github.ref }}
9+
10+
jobs:
11+
version:
12+
name: Prepare Release PR
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
19+
with:
20+
fetch-depth: 0 # To get all tags
21+
ref: ${{ github.ref }}
22+
- name: Set up environment
23+
uses: ./.github/actions/setup
24+
- name: Create Prepare Release PR
25+
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc #v1.4.10
26+
with:
27+
title: Prepare Release
28+
commit: Prepare Release
29+
version: npm run version
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)