Skip to content

Commit

Permalink
chore: add latest build version to draft
Browse files Browse the repository at this point in the history
  • Loading branch information
fcying committed Aug 31, 2024
1 parent 5f668be commit e243865
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
contents: write
env:
VERSION: ""
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -33,6 +34,9 @@ jobs:
cur_ver=$(git describe --abbrev=0 --tags)
if [ "$new_ver" != "$cur_ver" ]; then
version=$new_ver
else
id=$(git rev-parse --short HEAD)
sed -E "s|v[0-9]+\.[0-9]+\.[0-9]+|$id|" cmd/compiledb/main.go -i
fi
echo "VERSION=$version" >> $GITHUB_ENV
Expand Down Expand Up @@ -65,11 +69,12 @@ jobs:
tar cJvf compiledb.txz compiledb
mv compiledb.txz $out/compiledb-darwin-arm64.txz
gh release delete latest --cleanup-tag -y || true
ls -la $out
- uses: actions/upload-artifact@v4
with:
name: bin
name: binary
path: build/*

- name: Release
Expand All @@ -81,3 +86,13 @@ jobs:
artifactErrorsFailBuild: true
generateReleaseNotes: true
artifacts: "build/*"

- name: Update latest
uses: ncipollo/release-action@v1
with:
tag: latest
artifactErrorsFailBuild: true
generateReleaseNotes: true
prerelease: true
draft: true
artifacts: "build/*"

0 comments on commit e243865

Please sign in to comment.