Skip to content

Commit 31500c5

Browse files
Use 7-digit commit hashes in release artifacts. (#4599)
[SC-38683](https://app.shortcut.com/tiledb-inc/story/38683) Fixes a regression introduced in #4518. --- TYPE: BUILD DESC: Fix regression where release artifacts had 8-digit commit hashes.
1 parent acb3ea0 commit 31500c5

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- name: Set variables
6666
id: get-values
6767
run: |
68-
release_hash=$( echo ${{ github.sha }} | cut -c-8 - )
68+
release_hash=$( echo ${{ github.sha }} | cut -c-7 - )
6969
ref=${{ github.head_ref || github.ref_name }}
7070
echo "release_hash=$release_hash" >> $GITHUB_OUTPUT
7171
echo "archive_name=tiledb-${{ matrix.platform }}-${ref##*/}-$release_hash" >> $GITHUB_OUTPUT
@@ -124,8 +124,24 @@ jobs:
124124
source $GITHUB_WORKSPACE/scripts/ci/print_logs.sh
125125
if: failure() # only run this job if the build step failed
126126

127-
Publish-Release:
127+
Test-Release-Artifacts:
128128
needs: Build-Release
129+
runs-on: ubuntu-latest
130+
steps:
131+
- name: Download release artifacts
132+
uses: actions/download-artifact@v2
133+
with:
134+
name: tiledb-dist
135+
path: dist
136+
- name: Test names of release artifacts
137+
run: |
138+
if [ ls dist/ | grep -Ev -- '^tiledb-(linux|macos|windows)+-(x86_64|arm64)(-noavx2)?-.+-[0-9a-f]{7}\.(zip|tar\.gz)$' ]; then
139+
echo "Some release artifact names do not match expected pattern"
140+
exit 1
141+
fi
142+
143+
Publish-Release:
144+
needs: Test-Release-Artifacts
129145
if: startsWith(github.ref, 'refs/tags/')
130146
runs-on: ubuntu-latest
131147
steps:

0 commit comments

Comments
 (0)