Skip to content

chore: add auto tag git workflow #1

chore: add auto tag git workflow

chore: add auto tag git workflow #1

Workflow file for this run

name: Tag Main Branch
on:
push:
branches:
- test-tag-branch
workflow_dispatch:
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Git
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
- name: Determine tag version
id: get_tag
run: |
echo "TAG_NAME=v1.0.$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
- name: Create and push tag
env:
TAG_NAME: ${{ env.TAG_NAME }}
run: |
git tag $TAG_NAME
git push origin $TAG_NAME