@@ -3,39 +3,39 @@ name: Release Upgradeable
33on :
44 workflow_dispatch : {}
55
6- env :
7- UPGRADEABLE_REPO : OpenZeppelin/openzeppelin-contracts-upgradeable
8-
96jobs :
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 :
2320 ref : ${{ github.ref }}
2421 path : lib/openzeppelin-contracts
2522 - name : Set up environment
2623 uses : ./.github/actions/setup
27- - name : Get reference commit
28- id : get-reference-commit
24+ - name : Get commits
25+ id : get-commits
2926 run : |
27+ echo "upgradeable_commit=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
3028 cd lib/openzeppelin-contracts
31- echo "commit =$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
29+ echo "reference_commit =$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
3230 - name : Check upgradeable
3331 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
32+ run : bash scripts/release/workflow/check-upgradeable.sh
3533 env :
36- REFERENCE_COMMIT : ${{ steps.get-reference-commit .outputs.commit }}
34+ REFERENCE_COMMIT : ${{ steps.get-commits .outputs.reference_commit }}
3735 outputs :
3836 publish : ${{ steps.check-upgradeable.outcome }}
37+ reference_commit : ${{ steps.get-commits.outputs.reference_commit }}
38+ upgradeable_commit : ${{ steps.get-commits.outputs.upgradeable_commit }}
3939 is_prerelease : ${{ steps.check-upgradeable.outputs.is_prerelease }}
4040
4141 # copied from release-cycle.yml
5151 steps :
5252 - uses : actions/checkout@v6
5353 with :
54- repository : ${{ env.UPGRADEABLE_REPO }}
54+ repository : ${{ github.repository }}-upgradeable
5555 ref : ${{ github.ref }}
56+ token : ${{ secrets.GH_TOKEN_UPGRADEABLE }}
5657 - uses : actions/checkout@v6
5758 with :
5859 ref : ${{ github.ref }}
@@ -69,18 +70,20 @@ jobs:
6970 with :
7071 name : ${{ github.ref_name }}
7172 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 }}
73+ # - name: Publish
74+ # run: bash scripts/release/workflow/publish.sh
75+ # env:
76+ # TARBALL: ${{ steps.pack.outputs.tarball }}
77+ # TAG: ${{ steps.pack.outputs.tag }}
7778 - name : Create Github Release
7879 uses : actions/github-script@v8
7980 env :
8081 PRERELEASE : ${{ needs.state.outputs.is_prerelease }}
82+ REPO : ${{ context.repo.owner }}-upgradeable
83+ SHA : ${{ needs.state.outputs.upgradeable_commit }}
8184 with :
8285 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
86+ script : await require('./scripts/release/workflow/github-release.js')({ github, context })
8487 outputs :
8588 tarball_name : ${{ steps.pack.outputs.tarball_name }}
8689
0 commit comments