Skip to content

v0.0.14

v0.0.14 #3

Workflow file for this run

name: Update Version and Tag
on:
release:
types: [created]
jobs:
update-version:
runs-on: ubuntu-latest
env:
TAG_VERSION: ${{ github.event.release.tag_name }}
BRANCH_NAME: update-tag-version-${{ github.event.release.tag_name }}
steps:
# Step 1: Checkout the original repository's code
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Step 2: Set up Git with official account
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Step 3: Update version/version file
- name: Update version file
run: |
echo "${{ env.TAG_VERSION }}" > version/version
# Step 4: Commit and push changes
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git checkout -b ${{ env.BRANCH_NAME }}
git add version/version
git commit -m "Update version to ${{ env.TAG_VERSION }}"
git push origin ${{ env.BRANCH_NAME }}
# Step 5: Create and push tag
- name: Create and push tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag ${{ env.TAG_VERSION }}
git push origin ${{ env.TAG_VERSION }}