Skip to content

Commit 5f6f0a8

Browse files
committed
chore: add latest build version to draft
1 parent 5f668be commit 5f6f0a8

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
contents: write
1717
env:
1818
VERSION: ""
19+
GH_TOKEN: ${{ github.token }}
1920
steps:
2021
- uses: actions/checkout@v4
2122
with:
@@ -33,6 +34,9 @@ jobs:
3334
cur_ver=$(git describe --abbrev=0 --tags)
3435
if [ "$new_ver" != "$cur_ver" ]; then
3536
version=$new_ver
37+
else
38+
id=$(git rev-parse --short HEAD)
39+
sed -E "s|v[0-9]+\.[0-9]+\.[0-9]+|$id|" cmd/compiledb/main.go -i
3640
fi
3741
echo "VERSION=$version" >> $GITHUB_ENV
3842
@@ -65,11 +69,12 @@ jobs:
6569
tar cJvf compiledb.txz compiledb
6670
mv compiledb.txz $out/compiledb-darwin-arm64.txz
6771
72+
gh release delete Latest --cleanup-tag -y || true
6873
ls -la $out
6974
7075
- uses: actions/upload-artifact@v4
7176
with:
72-
name: bin
77+
name: binary
7378
path: build/*
7479

7580
- name: Release
@@ -81,3 +86,13 @@ jobs:
8186
artifactErrorsFailBuild: true
8287
generateReleaseNotes: true
8388
artifacts: "build/*"
89+
90+
- name: Update latest
91+
uses: ncipollo/release-action@v1
92+
with:
93+
tag: Latest
94+
artifactErrorsFailBuild: true
95+
generateReleaseNotes: true
96+
prerelease: true
97+
draft: false
98+
artifacts: "build/*"

0 commit comments

Comments
 (0)