chore(ci): Rename release artifacts (#1389)

This commit is contained in:
Eric 2026-01-28 10:47:13 +11:00 committed by GitHub
parent e596de78c2
commit 1c970e9ff6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 15 deletions

View File

@ -48,7 +48,7 @@ jobs:
- name: Check `nph` formatting
uses: arnetheduck/nph-action@v1
with:
version: 0.6.1
version: latest
options: "codex/ tests/"
fail: true
suggest: true

View File

@ -11,7 +11,7 @@ on:
env:
cache_nonce: 0 # Allows for easily busting actions/cache caches
nim_version: pinned
storage_binary_base: storage
storage_binary_base: logos-storage
build_dir: build
nim_flags: ''
windows_libs: 'libstdc++-6.dll libgomp-1.dll libgcc_s_seh-1.dll libwinpthread-1.dll'
@ -49,6 +49,16 @@ jobs:
runs-on: ${{ matrix.builder }}
timeout-minutes: 80
steps:
- name: Set version variable
shell: bash
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
echo "TAGGED_RELEASE=true" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_SHA::7}" >> $GITHUB_ENV
echo "TAGGED_RELEASE=false" >> $GITHUB_ENV
fi
- name: Release - Checkout sources
uses: actions/checkout@v4
with:
@ -69,8 +79,7 @@ jobs:
macos*) os_name="darwin" ;;
windows*) os_name="windows" ;;
esac
github_ref_name="${GITHUB_REF_NAME/\//-}"
storage_binary="${{ env.storage_binary_base }}-${github_ref_name}-${os_name}-${{ matrix.cpu }}"
storage_binary="${{ env.storage_binary_base }}-${os_name}-${{ matrix.cpu }}-${{ env.VERSION }}"
if [[ ${os_name} == "windows" ]]; then
storage_binary="${storage_binary}.exe"
fi
@ -110,7 +119,7 @@ jobs:
- name: Release - Upload Logos Storage build artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ env.storage_binary }}
name: ${{ env.storage_binary }}
path: ${{ env.build_dir }}/${{ env.storage_binary_base }}*
retention-days: 30
@ -118,22 +127,24 @@ jobs:
if: matrix.os == 'windows'
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.os }}-libs
name: ${{ env.storage_binary }}-dlls
path: ${{ env.build_dir }}/*.dll
retention-days: 30
- name: Release -Package artifacts Linux
- name: Release - Package artifacts Linux
if: matrix.os == 'linux'
run: |
sudo apt-get update && sudo apt-get install -y zip
ZIPFILE=libstorage-linux-${{ matrix.cpu }}.zip
github_ref_name="${GITHUB_REF_NAME/\//-}"
ZIPFILE=libstorage-linux-${{ matrix.cpu }}-${{ env.VERSION }}.zip
zip -j $ZIPFILE ./build/libstorage.so ./library/libstorage.h
echo "ZIPFILE=$ZIPFILE" >> $GITHUB_ENV
- name: Package artifacts MacOS
if: matrix.os == 'macos'
run: |
ZIPFILE=libstorage-macos-${{ matrix.cpu }}.zip
github_ref_name="${GITHUB_REF_NAME/\//-}"
ZIPFILE=libstorage-macos-${{ matrix.cpu }}-${{ env.VERSION }}.zip
zip -j $ZIPFILE ./build/libstorage.dylib ./library/libstorage.h
echo "ZIPFILE=$ZIPFILE" >> $GITHUB_ENV
@ -141,7 +152,7 @@ jobs:
if: matrix.os == 'windows'
shell: msys2 {0}
run: |
ZIPFILE=libstorage-windows-${{ matrix.cpu }}.zip
ZIPFILE=libstorage-windows-${{ matrix.cpu }}-${{ env.VERSION }}.zip
(cd ./build && 7z a -tzip "${GITHUB_WORKSPACE}/${ZIPFILE}" libstorage.dll)
(cd ./library && 7z a -tzip "${GITHUB_WORKSPACE}/${ZIPFILE}" libstorage.h)
echo "ZIPFILE=$ZIPFILE" >> $GITHUB_ENV
@ -162,7 +173,7 @@ jobs:
- name: Release - Download binaries
uses: actions/download-artifact@v4
with:
pattern: release*
pattern: ${{ env.storage_binary_base }}*
merge-multiple: true
path: /tmp/release
@ -226,7 +237,7 @@ jobs:
folder="/tmp/release"
# Tagged releases
if [[ "${{ github.ref }}" == *"refs/tags/"* ]]; then
if [[ "${{ env.TAGGED_RELEASE }}" == "true" ]]; then
aws s3 cp --recursive "${folder}" s3://${{ env.s3_bucket }}/releases/${branch} --endpoint-url ${{ env.s3_endpoint }}
echo "${branch}" > "${folder}"/latest
aws s3 cp "${folder}"/latest s3://${{ env.s3_bucket }}/releases/latest --endpoint-url ${{ env.s3_endpoint }}
@ -243,7 +254,7 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
if: env.TAGGED_RELEASE
with:
files: |
/tmp/release/*
@ -251,7 +262,7 @@ jobs:
- name: Generate Python SDK
uses: peter-evans/repository-dispatch@v3
if: startsWith(github.ref, 'refs/tags/')
if: env.TAGGED_RELEASE
with:
token: ${{ secrets.DISPATCH_PAT }}
repository: logos-storage/logos-storage-py-api-client