2
0

update-main-version.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. - v5
  14. - v4
  15. - v3
  16. - v2
  17. jobs:
  18. tag:
  19. runs-on: ubuntu-latest
  20. steps:
  21. # Note this update workflow can also be used as a rollback tool.
  22. # For that reason, it's best to pin `actions/checkout` to a known, stable version
  23. # (typically, about two releases back).
  24. - uses: actions/checkout@v6
  25. with:
  26. fetch-depth: 0
  27. - name: Git config
  28. run: |
  29. git config user.name "github-actions[bot]"
  30. git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
  31. - name: Tag new target
  32. run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
  33. - name: Push new tag
  34. run: git push origin ${{ github.event.inputs.major_version }} --force