Skip to content

Commit 1cc3abd

Browse files
committed
Integrate upgradeable release into release-cycle.yml
1 parent 2efe235 commit 1cc3abd

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

.github/workflows/release-cycle.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020

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

23+
env:
24+
MAIN_REPO: OpenZeppelin/openzeppelin-contracts
25+
UPGRADEABLE_REPO: OpenZeppelin/openzeppelin-contracts-upgradeable
26+
2327
jobs:
2428
state:
2529
name: Check state
@@ -28,6 +32,11 @@ jobs:
2832
runs-on: ubuntu-latest
2933
steps:
3034
- uses: actions/checkout@v6
35+
- if: ${{ github.repository == env.UPGRADEABLE_REPO }}
36+
uses: actions/checkout@v6
37+
repository: ${{ env.MAIN_REPO }}
38+
ref: ${{ github.ref }}
39+
path: lib/openzeppelin-contracts
3140
- name: Set up environment
3241
uses: ./.github/actions/setup
3342
- id: state
@@ -136,6 +145,11 @@ jobs:
136145
runs-on: ubuntu-latest
137146
steps:
138147
- uses: actions/checkout@v6
148+
- if: ${{ github.repository == env.UPGRADEABLE_REPO }}
149+
uses: actions/checkout@v6
150+
repository: ${{ env.MAIN_REPO }}
151+
ref: ${{ github.ref }}
152+
path: lib/openzeppelin-contracts
139153
- name: Set up environment
140154
uses: ./.github/actions/setup
141155
- id: pack

scripts/release/workflow/state.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ module.exports = async ({ github, context, core }) => {
1313
}
1414

1515
// Jobs to trigger
16-
setOutput('start', shouldRunStart(state));
17-
setOutput('promote', shouldRunPromote(state));
18-
setOutput('changesets', shouldRunChangesets(state));
19-
setOutput('publish', shouldRunPublish(state));
20-
setOutput('merge', shouldRunMerge(state));
16+
if (github.repository.endsWith('-upgradeable')) {
17+
setOutput('publish', shouldRunPublish(state));
18+
} else {
19+
setOutput('start', shouldRunStart(state));
20+
setOutput('promote', shouldRunPromote(state));
21+
setOutput('changesets', shouldRunChangesets(state));
22+
setOutput('publish', shouldRunPublish(state));
23+
setOutput('merge', shouldRunMerge(state));
24+
}
2125

2226
// Global Variables
2327
setOutput('is_prerelease', state.prerelease);

0 commit comments

Comments
 (0)