Skip to content

testing edits

testing edits #12

name: Release Upgradeable

Check failure on line 1 in .github/workflows/release-upgradeable.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-upgradeable.yml

Invalid workflow file

(Line: 82, Col: 17): Unrecognized named-value: 'context'. Located at position 1 within expression: context.repo.owner
on:
workflow_dispatch: {}
jobs:
state:
name: Check state
permissions:
pull-requests: read
if: ${{ !endsWith(github.repository, '-upgradeable') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
repository: ${{ github.repository }}-upgradeable
ref: ${{ github.ref }}
- uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
path: lib/openzeppelin-contracts
- name: Set up environment
uses: ./.github/actions/setup
- name: Get commits
id: get-commits
run: |
echo "upgradeable_commit=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
cd lib/openzeppelin-contracts
echo "reference_commit=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Check upgradeable
id: check-upgradeable
run: bash scripts/release/workflow/check-upgradeable.sh
env:
REFERENCE_COMMIT: ${{ steps.get-commits.outputs.reference_commit }}
outputs:
publish: ${{ steps.check-upgradeable.outcome }}
reference_commit: ${{ steps.get-commits.outputs.reference_commit }}
upgradeable_commit: ${{ steps.get-commits.outputs.upgradeable_commit }}
is_prerelease: ${{ steps.check-upgradeable.outputs.is_prerelease }}
# copied from release-cycle.yml
publish:
needs: state
name: Publish to npm
environment: npm
permissions:
contents: write
id-token: write
if: needs.state.outputs.publish == 'success' # Note: changed from 'true' to 'success' to support the way publish is computed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
repository: ${{ github.repository }}-upgradeable
ref: ${{ github.ref }}
token: ${{ secrets.GH_TOKEN_UPGRADEABLE }}
- uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
path: lib/openzeppelin-contracts
- name: Set up environment
uses: ./.github/actions/setup
- id: pack
name: Pack
run: bash scripts/release/workflow/pack.sh
env:
PRERELEASE: ${{ needs.state.outputs.is_prerelease }}
- name: Upload tarball artifact
uses: actions/upload-artifact@v5
with:
name: ${{ github.ref_name }}
path: ${{ steps.pack.outputs.tarball }}
# - name: Publish
# run: bash scripts/release/workflow/publish.sh
# env:
# TARBALL: ${{ steps.pack.outputs.tarball }}
# TAG: ${{ steps.pack.outputs.tag }}
- name: Create Github Release
uses: actions/github-script@v8
env:
PRERELEASE: ${{ needs.state.outputs.is_prerelease }}
REPO: ${{ context.repo.owner }}-upgradeable
SHA: ${{ needs.state.outputs.upgradeable_commit }}
with:
github-token: ${{ secrets.GH_TOKEN_UPGRADEABLE }}
script: await require('./scripts/release/workflow/github-release.js')({ github, context })
outputs:
tarball_name: ${{ steps.pack.outputs.tarball_name }}
integrity_check:
needs: publish
name: Tarball Integrity Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download tarball artifact
id: artifact
uses: actions/download-artifact@v6
with:
name: ${{ github.ref_name }}
- name: Check integrity
run: bash scripts/release/workflow/integrity-check.sh
env:
TARBALL: ${{ steps.artifact.outputs.download-path }}/${{ needs.publish.outputs.tarball_name }}