Skip to content

Commit 61614db

Browse files
committed
Refactor CD workflow; consolidate tag handling logic
1 parent cccf730 commit 61614db

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

.github/workflows/cd.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
tags:
8-
- "*"
97
pull_request:
108
workflow_dispatch:
119

@@ -105,28 +103,22 @@ jobs:
105103
- name: Commit Version Bump
106104
run: git commit -a --amend --no-edit
107105

108-
# - name: New version
109-
# id: new_version
110-
# run: git describe --tags --abbrev=0 HEAD
106+
- name: New version
107+
id: app
108+
run: echo "version=$(git describe --tags --abbrev=0 HEAD)" >> $GITHUB_OUTPUT
111109

112-
# - name: Delete old tag
113-
# run: git tag -d ${{ steps.new_version.outputs.new_version }}
110+
- name: Delete old tag
111+
run: git tag -d ${{ steps.app.outputs.version }}
114112

115-
# - name: Create new tag
116-
# run: git tag v${{ steps.new_version.outputs.new_version }}
113+
- name: Create new tag
114+
run: git tag v${{ steps.app.outputs.version }}
117115

118116
# - name: Publish to crates.io
119117
# run: cargo publish --allow-dirty
120118

121119
- name: Push to origin
122120
run: git push origin HEAD --tags
123121

124-
precompile:
125-
needs: release
126-
runs-on: ubuntu-latest
127-
steps:
128-
- uses: actions/checkout@v4
129-
130122
- name: Download all artifacts
131123
run: gh run download ${{ github.run_id }}
132124

@@ -139,5 +131,6 @@ jobs:
139131
- name: Uploads compressed artifacts
140132
uses: softprops/action-gh-release@v2
141133
with:
134+
tag_name: v${{ steps.app.outputs.version }}
142135
fail_on_unmatched_files: true
143136
files: git-ai-*.tar.gz

0 commit comments

Comments
 (0)