github.com/gogf/gf/v2@v2.7.4/.github/workflows/tag.yml (about)

     1  name: GoFrame AutoCreating SubMod Tags
     2  
     3  on:
     4    push:
     5      # Sequence of patterns matched against refs/tags
     6      tags:
     7      - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
     8  
     9  env:
    10    TZ: Asia/Shanghai
    11    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    12  
    13  
    14  jobs:
    15    build:
    16      name: Auto Creating Tags
    17      runs-on: ubuntu-latest
    18      steps:
    19        - name: Checkout Github Code
    20          uses: actions/checkout@v4
    21  
    22        - name: Auto Creating Tags For Contrib Packages
    23          run: |
    24            git config --global user.email "tagrobot@goframe.org"
    25            git config --global user.name  "TagRobot"
    26            
    27            # auto create tags for contrib packages.
    28            for file in `find contrib -name go.mod`; do
    29                tag=$(dirname $file)/$GITHUB_REF_NAME
    30                git tag $tag
    31                git push origin $tag
    32            done
    33            
    34            # auto create tag for cli tool
    35            for file in `find cmd -name go.mod`; do
    36                tag=$(dirname $file)/$GITHUB_REF_NAME
    37                git tag $tag
    38                git push origin $tag
    39            done