chore: update git workflow checkout version #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- 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 |