update-main-version.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. name: Update Main Version
  2. run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
  3. on:
  4. workflow_dispatch:
  5. inputs:
  6. target:
  7. description: The tag or reference to use
  8. required: true
  9. major_version:
  10. type: choice
  11. description: The major version to update
  12. options:
  13. - v4
  14. - v3
  15. - v2
  16. jobs:
  17. tag:
  18. runs-on: ubuntu-latest
  19. steps:
  20. # Note this update workflow can also be used as a rollback tool.
  21. # For that reason, it's best to pin `actions/checkout` to a known, stable version
  22. # (typically, about two releases back).
  23. - uses: actions/checkout@v4.1.1
  24. with:
  25. fetch-depth: 0
  26. - name: Git config
  27. run: |
  28. git config user.name "github-actions[bot]"
  29. git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
  30. - name: Tag new target
  31. run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
  32. - name: Push new tag
  33. run: git push origin ${{ github.event.inputs.major_version }} --force