Skip to content

Commit 03dd7ed

Browse files
committed
testing edits
1 parent 7317e0f commit 03dd7ed

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

.github/workflows/release-upgradeable.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@ name: Release Upgradeable
33
on:
44
workflow_dispatch: {}
55

6-
env:
7-
UPGRADEABLE_REPO: OpenZeppelin/openzeppelin-contracts-upgradeable
8-
96
jobs:
107
state:
118
name: Check state
129
permissions:
1310
pull-requests: read
14-
if: ${{ github.repository == 'OpenZeppelin/openzeppelin-contracts' }}
11+
if: ${{ !endsWith(github.repository, '-upgradeable') }}
1512
runs-on: ubuntu-latest
1613
steps:
1714
- uses: actions/checkout@v6
1815
with:
19-
repository: ${{ env.UPGRADEABLE_REPO }}
16+
repository: ${{ github.repository }}-upgradeable
2017
ref: ${{ github.ref }}
2118
- uses: actions/checkout@v6
2219
with:
@@ -31,7 +28,7 @@ jobs:
3128
echo "commit=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
3229
- name: Check upgradeable
3330
id: check-upgradeable
34-
run: bash lib/openzeppelin/scripts/release/workflow/check-upgradeable.sh # TODO: remove path prefix when this is merged and the change are transpiled
31+
run: bash scripts/release/workflow/check-upgradeable.sh
3532
env:
3633
REFERENCE_COMMIT: ${{ steps.get-reference-commit.outputs.commit }}
3734
outputs:
@@ -51,8 +48,9 @@ jobs:
5148
steps:
5249
- uses: actions/checkout@v6
5350
with:
54-
repository: ${{ env.UPGRADEABLE_REPO }}
51+
repository: ${{ github.repository }}-upgradeable
5552
ref: ${{ github.ref }}
53+
token: ${{ secrets.GH_TOKEN_UPGRADEABLE }}
5654
- uses: actions/checkout@v6
5755
with:
5856
ref: ${{ github.ref }}
@@ -69,18 +67,18 @@ jobs:
6967
with:
7068
name: ${{ github.ref_name }}
7169
path: ${{ steps.pack.outputs.tarball }}
72-
- name: Publish
73-
run: bash scripts/release/workflow/publish.sh
74-
env:
75-
TARBALL: ${{ steps.pack.outputs.tarball }}
76-
TAG: ${{ steps.pack.outputs.tag }}
70+
# - name: Publish
71+
# run: bash scripts/release/workflow/publish.sh
72+
# env:
73+
# TARBALL: ${{ steps.pack.outputs.tarball }}
74+
# TAG: ${{ steps.pack.outputs.tag }}
7775
- name: Create Github Release
7876
uses: actions/github-script@v8
7977
env:
8078
PRERELEASE: ${{ needs.state.outputs.is_prerelease }}
8179
with:
8280
github-token: ${{ secrets.GH_TOKEN_UPGRADEABLE }}
83-
script: await require('./lib/openzeppelin-contracts/scripts/release/workflow/github-release.js')({ github, context }, '${{ env.UPGRADEABLE_REPO }}') # TODO: remove path prefix when this is merged and the change are transpiled
81+
script: await require('./scripts/release/workflow/github-release.js')({ github, context }, '-upgradeable')
8482
outputs:
8583
tarball_name: ${{ steps.pack.outputs.tarball_name }}
8684

.github/workflows/upgradeable.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: transpile upgradeable
1+
name: Transpile upgradeable
22

33
on:
44
push:
@@ -9,11 +9,12 @@ on:
99
jobs:
1010
transpile:
1111
environment: push-upgradeable
12+
if: ${{ !endsWith(github.repository, '-upgradeable') }}
1213
runs-on: ubuntu-latest
1314
steps:
1415
- uses: actions/checkout@v6
1516
with:
16-
repository: OpenZeppelin/openzeppelin-contracts-upgradeable
17+
repository: ${{ github.repository }}-upgradeable
1718
fetch-depth: 0
1819
token: ${{ secrets.GH_TOKEN_UPGRADEABLE }}
1920
- name: Fetch current non-upgradeable branch

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "openzeppelin-solidity",
33
"description": "Secure Smart Contract library for Solidity",
4-
"version": "5.5.0",
4+
"version": "5.6.0-rc.0",
55
"private": true,
66
"files": [
77
"/contracts/**/*.sol",

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 }, repo = undefined) => {
5+
module.exports = async ({ github, context }, repoSuffix = '') => {
66
const changelog = readFileSync('CHANGELOG.md', 'utf8');
77

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

0 commit comments

Comments
 (0)