Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions .github/workflows/github_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,33 @@ calculate_checksum "$sbom_path"
readonly sbom_checksum_path="${sbom_path}.sha256"

shopt -s nullglob
native_assets=("$base_dir"/native-image/target/openfasttrace-*)
# Expect binaries for Linux x86 + ARM, macOS ARM, Windows x86
if [[ "${#native_assets[@]}" -ne 4 ]]; then
echo "Expected 4 native images in native-image/target, found ${#native_assets[@]}" >&2
exit 1
fi
native_assets=()
native_release_assets=()
for native_asset in "${native_assets[@]}"; do
calculate_checksum "$native_asset"
native_release_assets+=("$native_asset" "${native_asset}.sha256")
for native_asset in "$base_dir"/native-image/target/openfasttrace-*; do
[[ ${native_asset##*/} =~ ^openfasttrace-(linux|windows|macos)([-._].*)?$ ]] &&
native_assets+=("$native_asset")
calculate_checksum "$native_asset"
native_release_assets+=("$native_asset" "${native_asset}.sha256")
done


# Create GitHub release
readonly changes_file="$base_dir/doc/changes/changes_${project_version}.md"
notes=$(cat "$changes_file")
readonly notes

readonly title="Release $project_version"
readonly tag="$project_version"
echo "Creating release:"
echo "Git tag : $tag"
echo "Title : $title"
echo "Changes file : $changes_file"
echo "Artifact file: $artifact_path"
echo
echo "Release Information"
echo "-------------------"
echo "Git tag : $tag"
echo "Title : $title"
echo "Changes file : $changes_file"
echo "Artifact file : $artifact_path"
echo "Artifact checksum: $artifact_checksum_path"
echo "SBOM file : $sbom_path"
echo "SBOM checksum: $sbom_checksum_path"
printf 'Native asset : %s\n' "${native_assets[@]}"
echo "SBOM file : $sbom_path"
echo "SBOM checksum : $sbom_checksum_path"
printf 'Platform binaries: %s\n' "${native_assets[@]}"

release_url=$(gh release create --latest --title "$title" --notes "$notes" --target main "$tag" \
"$artifact_path" "$artifact_checksum_path" "$sbom_path" "$sbom_checksum_path" \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ jobs:
server-username-env-var: MAVEN_USERNAME
server-password-env-var: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE

- name: Build
run: mvn --batch-mode -T 1C clean install -Dossindex.skip=true

- name: Download native images
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
pattern: openfasttrace-native-*
path: native-image/target
Expand Down
Loading