update-main-version.yml 861 B

12345678910111213141516171819202122232425262728293031
  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. - v3
  14. - v2
  15. jobs:
  16. tag:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - uses: actions/checkout@v3
  20. with:
  21. fetch-depth: 0
  22. - name: Git config
  23. run: |
  24. git config user.name github-actions
  25. git config user.email github-actions@github.com
  26. - name: Tag new target
  27. run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
  28. - name: Push new tag
  29. run: git push origin ${{ github.event.inputs.major_version }} --force