Blame | Last modification | View Log | Download
# https://help.github.com/en/categories/automating-your-workflow-with-github-actionsname: "Create tag"on:# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatchworkflow_dispatch:inputs:version:description: 'Next version'required: truedefault: 'patch'type: choiceoptions:- patch- minorjobs:create-tag:name: "Create tag"runs-on: "ubuntu-latest"steps:- name: "Checkout"uses: actions/checkout@v4with:fetch-depth: 0token: ${{ secrets.PHPSTAN_BOT_TOKEN }}- name: 'Get Previous tag'id: previoustaguses: "WyriHaximus/github-action-get-previous-tag@v1"env:GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"- name: 'Get next versions'id: semversuses: "WyriHaximus/github-action-next-semvers@v1"with:version: ${{ steps.previoustag.outputs.tag }}- name: "Create new minor tag"uses: rickstaa/action-create-tag@v1if: inputs.version == 'minor'with:tag: ${{ steps.semvers.outputs.minor }}message: ${{ steps.semvers.outputs.minor }}- name: "Create new patch tag"uses: rickstaa/action-create-tag@v1if: inputs.version == 'patch'with:tag: ${{ steps.semvers.outputs.patch }}message: ${{ steps.semvers.outputs.patch }}