Skip to content

Commit 1b7ce67

Browse files
authored
fix: ci.yaml
1 parent b56a8cc commit 1b7ce67

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/cl.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,34 @@ jobs:
6969
with:
7070
commit_message: "chore(changelog): update changelog [skip ci]"
7171

72+
- name: New Tag
73+
id: new_tag
74+
uses: orhun/git-cliff-action@v3
75+
with:
76+
config: ./cliff.toml
77+
args: --bumped-version
78+
79+
80+
- name: Print New Tag
81+
id: print_new_tag
82+
run: |
83+
echo "New Tag: ${{ steps.generate_unreleased_changelog.outputs.version }}"
84+
7285
- name: Create and push tag
7386
env:
74-
NEW_TAG: ""
87+
NEW_TAG: ${{ steps.generate_unreleased_changelog.outputs.version }}
7588
run: |
76-
echo "New Tag BEFORE: $NEW_TAG"
77-
NEW_TAG=$(git cliff --bumped-version)
78-
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
79-
git tag $NEW_TAG
80-
git push origin $NEW_TAG
81-
echo "New Tag AFTER: $NEW_TAG"
89+
git tag $NEW_TAG -m "Version $NEW_TAG"
90+
git push origin $NEW_TAG -m "Version $NEW_TAG"
8291
8392
# Optional: Create GitHub release
8493
- name: Create GitHub Release
8594
uses: actions/create-release@v1
8695
env:
8796
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
NEW_TAG: ${{ steps.generate_unreleased_changelog.outputs.version }}
8898
with:
8999
tag_name: ${{ env.NEW_TAG }}
90100
release_name: Release ${{ env.NEW_TAG }}
91101
body: ${{ steps.generate_unreleased_changelog.outputs.changelog }}
102+

0 commit comments

Comments
 (0)