Skip to content

Commit bdab307

Browse files
committed
change: run from main, add repo argument to github-release.js
1 parent cf6a921 commit bdab307

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/release-upgradeable.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ on:
55

66
env:
77
MAIN_REPO: OpenZeppelin/openzeppelin-contracts
8+
UPGRADEABLE_REPO: OpenZeppelin/openzeppelin-contracts-upgradeable
89

910
jobs:
1011
state:
1112
name: Check state
1213
permissions:
1314
pull-requests: read
14-
if: ${{ github.repository == 'OpenZeppelin/openzeppelin-contracts-upgradeable' }}
15+
if: ${{ github.repository == 'OpenZeppelin/openzeppelin-contracts' }}
1516
runs-on: ubuntu-latest
1617
steps:
1718
- uses: actions/checkout@v6
19+
with:
20+
repository: ${{ env.UPGRADEABLE_REPO }}
21+
ref: ${{ github.ref }}
1822
- uses: actions/checkout@v6
1923
with:
20-
repository: ${{ env.MAIN_REPO }}
2124
ref: ${{ github.ref }}
2225
path: lib/openzeppelin-contracts
2326
- name: Set up environment
@@ -48,9 +51,11 @@ jobs:
4851
runs-on: ubuntu-latest
4952
steps:
5053
- uses: actions/checkout@v6
51-
- uses: actions/checkout@v6 # Note: added
5254
with:
53-
repository: ${{ env.MAIN_REPO }}
55+
repository: ${{ env.UPGRADEABLE_REPO }}
56+
ref: ${{ github.ref }}
57+
- uses: actions/checkout@v6
58+
with:
5459
ref: ${{ github.ref }}
5560
path: lib/openzeppelin-contracts
5661
- name: Set up environment
@@ -75,7 +80,7 @@ jobs:
7580
env:
7681
PRERELEASE: ${{ needs.state.outputs.is_prerelease }}
7782
with:
78-
script: await require('./scripts/release/workflow/github-release.js')({ github, context })
83+
script: await require('./scripts/release/workflow/github-release.js')({ github, context, repo: '${{ env.UPGRADEABLE_REPO }}' })
7984
outputs:
8085
tarball_name: ${{ steps.pack.outputs.tarball_name }}
8186

scripts/release/workflow/github-release.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ const { readFileSync } = require('fs');
22
const { join } = require('path');
33
const { version } = require(join(__dirname, '../../../package.json'));
44

5-
module.exports = async ({ github, context }) => {
5+
module.exports = async ({ github, context, repo = context.repo.repo }) => {
66
const changelog = readFileSync('CHANGELOG.md', 'utf8');
77

88
await github.rest.repos.createRelease({
99
owner: context.repo.owner,
10-
repo: context.repo.repo,
10+
repo: repo,
1111
tag_name: `v${version}`,
1212
target_commitish: context.sha,
1313
body: extractSection(changelog, version),

0 commit comments

Comments
 (0)