Skip to content

Commit

Permalink
Merge pull request #15 from buildrun-tech/feature/updates-readme
Browse files Browse the repository at this point in the history
cd: fix the step of generate release version
  • Loading branch information
brunograna authored Feb 18, 2024
2 parents c9c7327 + a1aa68f commit ab131cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Determine next version
id: version
run: |
last_tag=$(git describe --abbrev=0)
last_tag=$(git describe --abbrev=0 --tags)
commit_range="${last_tag}..HEAD"
major=0
minor=0
Expand Down Expand Up @@ -106,6 +106,7 @@ jobs:
git log --pretty=format:"%h %s" "$commit_range" > commits.txt
- name: Create new tag
if: steps.commits.outputs.new_version != '0.0.0'
run: git tag -a ${{ steps.version.outputs.new_version }} -m "Version ${{ steps.version.outputs.new_version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -140,6 +141,7 @@ jobs:
continue-on-error: false

- name: Push new tag
if: steps.commits.outputs.new_version != '0.0.0'
run: git push origin ${{ steps.version.outputs.new_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit ab131cb

Please sign in to comment.