update-main-version.yml 841 B

123456789101112131415161718192021222324252627282930
  1. name: Update Main Version
  2. run-name: Move ${{ github.event.inputs.main_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. main_version:
  10. type: choice
  11. description: The main version to update
  12. options:
  13. - v3
  14. jobs:
  15. tag:
  16. runs-on: ubuntu-latest
  17. steps:
  18. - uses: actions/checkout@v3
  19. with:
  20. fetch-depth: 0
  21. - name: Git config
  22. run: |
  23. git config user.name github-actions
  24. git config user.email github-actions@github.com
  25. - name: Tag new target
  26. run: git tag -f ${{ github.event.inputs.main_version }} ${{ github.event.inputs.target }}
  27. - name: Push new tag
  28. run: git push origin ${{ github.event.inputs.main_version }} --force