@@ -44,16 +44,18 @@ jobs:
4444 run : |
4545 TAG_NAME=${GITHUB_REF#refs/tags/}
4646 cp bazel-bin/sparrow-cli.tar.gz sparrow-cli-${TAG_NAME}-linux.tar.gz
47+ echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
4748 - name : Rename artifact with commit hash for push
4849 if : ${{ !startsWith(github.ref, 'refs/tags/') }}
4950 run : |
5051 SHORT_COMMIT=$(echo ${{ github.sha }} | cut -c1-7)
5152 cp bazel-bin/sparrow-cli.tar.gz sparrow-cli-${SHORT_COMMIT}-linux.tar.gz
53+ echo "ARTIFACT_NAME=sparrow-cli-${SHORT_COMMIT}-linux" >> $GITHUB_ENV
5254 - name : Upload sparrow-cli.tar.gz artifact
5355 if : ${{ !startsWith(github.ref, 'refs/tags/') }}
5456 uses : actions/upload-artifact@v4
5557 with :
56- name : sparrow-cli-linux
58+ name : ${{ env.ARTIFACT_NAME }}
5759 path : sparrow-cli-*-linux.tar.gz
5860 - name : Upload to Release
5961 if : startsWith(github.ref, 'refs/tags/')
6264 files : sparrow-cli-*-linux.tar.gz
6365
6466 build-macos :
65- runs-on : macos-latest
67+ runs-on : macos-14
6668 steps :
6769 - name : Checkout repository
6870 uses : actions/checkout@v4
@@ -83,16 +85,18 @@ jobs:
8385 run : |
8486 TAG_NAME=${GITHUB_REF#refs/tags/}
8587 cp bazel-bin/sparrow-cli.tar.gz sparrow-cli-${TAG_NAME}-mac.tar.gz
88+ echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
8689 - name : Rename artifact with commit hash for push
8790 if : ${{ !startsWith(github.ref, 'refs/tags/') }}
8891 run : |
8992 SHORT_COMMIT=$(echo ${{ github.sha }} | cut -c1-7)
9093 cp bazel-bin/sparrow-cli.tar.gz sparrow-cli-${SHORT_COMMIT}-mac.tar.gz
94+ echo "ARTIFACT_NAME=sparrow-cli-${SHORT_COMMIT}-mac" >> $GITHUB_ENV
9195 - name : Upload sparrow-cli.tar.gz artifact
9296 if : ${{ !startsWith(github.ref, 'refs/tags/') }}
9397 uses : actions/upload-artifact@v4
9498 with :
95- name : sparrow-cli-macos
99+ name : ${{ env.ARTIFACT_NAME }}
96100 path : sparrow-cli-*-mac.tar.gz
97101 - name : Upload to Release
98102 if : startsWith(github.ref, 'refs/tags/')
0 commit comments