Hi, I’m Dung Huynh Duc . Nice to meet you.

About Me

I’m a full stack developer. I’m a fast learner and self-taught coder. I often take my time for researching and learning about hot and trending technology.

github action
semver

#TIL 29 - Git version

blog_hero_#TIL 29 - Git version
# .github/workflows/version.yml
name: Git Version

on:
  push:
    branches:
      - release
      - main

jobs:
  version:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3
        with:
          ref: ${{ github.head_ref }}   # checkout the correct branch name
          fetch-depth: 0                # fetch the whole repo history

      - name: Git Version
        id: get-version
        uses: codacy/git-version@2.5.4

      - name: New Version
        run: echo ${{ steps.get-version.outputs.version }}