Skip to content

Commit e25503c

Browse files
zhouang777Copilot
andauthored
Update .github/workflows/bazel_cli_build.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 304a970 commit e25503c

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

.github/workflows/bazel_cli_build.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,11 @@ jobs:
8282
repository-cache: true
8383
- name: Build All
8484
run: bazel build //...
85-
- name: Rename artifact with tag for release
86-
if: startsWith(github.ref, 'refs/tags/')
87-
run: |
88-
TAG_NAME=${GITHUB_REF#refs/tags/}
89-
cp bazel-bin/sparrow-cli.tar.gz sparrow-cli-${TAG_NAME}-mac.tar.gz
90-
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
91-
- name: Rename artifact with commit hash for push
92-
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
93-
run: |
94-
SHORT_COMMIT=$(echo ${{ github.sha }} | cut -c1-7)
95-
cp bazel-bin/sparrow-cli.tar.gz sparrow-cli-${SHORT_COMMIT}-mac.tar.gz
96-
echo "ARTIFACT_NAME=sparrow-cli-${SHORT_COMMIT}-mac" >> $GITHUB_ENV
85+
- name: Copy and rename artifact
86+
uses: ./.github/actions/copy-artifact
87+
with:
88+
source: bazel-bin/sparrow-cli.tar.gz
89+
platform: mac
9790
- name: Upload sparrow-cli.tar.gz artifact
9891
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
9992
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)