upgradeable.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. name: transpile upgradeable
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - release-v*
  7. jobs:
  8. transpile:
  9. environment: push-upgradeable
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v5
  13. with:
  14. repository: OpenZeppelin/openzeppelin-contracts-upgradeable
  15. fetch-depth: 0
  16. token: ${{ secrets.GH_TOKEN_UPGRADEABLE }}
  17. - name: Fetch current non-upgradeable branch
  18. run: |
  19. git fetch "$REMOTE" master # Fetch default branch first for patch to apply cleanly
  20. git fetch "$REMOTE" "$REF"
  21. git checkout FETCH_HEAD
  22. env:
  23. REF: ${{ github.ref }}
  24. REMOTE: https://github.com/${{ github.repository }}.git
  25. - name: Set up environment
  26. uses: ./.github/actions/setup
  27. - run: bash scripts/git-user-config.sh
  28. - name: Transpile to upgradeable
  29. run: bash scripts/upgradeable/transpile-onto.sh ${{ github.ref_name }} origin/${{ github.ref_name }}
  30. env:
  31. SUBMODULE_REMOTE: https://github.com/${{ github.repository }}.git
  32. - run: git push origin ${{ github.ref_name }}