Bump to v0.10.0 #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release create ${{ github.ref_name }} | |
assets: | |
needs: release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
# The targets should match the platforms on the package's Yggdrasil build recipe: | |
# https://github.com/JuliaPackaging/Yggdrasil/blob/e8a9f04d70652738c682407b9799ada044d24614/O/object_store_ffi/build_tarballs.jl#L20 | |
# 64-bit (x86) | |
- build: linux-64-bit | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
prebuild: "true" | |
command: cross | |
- build: macos-64-bit | |
os: macos-latest | |
target: x86_64-apple-darwin | |
prebuild: "true" | |
command: cargo | |
# 64-bit (ARM) | |
- build: linux-arm | |
os: ubuntu-latest | |
target: aarch64-unknown-linux-gnu | |
prebuild: "true" | |
command: cross | |
- build: macos-arm | |
os: macos-latest | |
target: aarch64-apple-darwin | |
prebuild: "true" | |
command: cargo | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.target }} | |
- run: cargo install cross --git https://github.com/cross-rs/cross | |
- run: ${{ matrix.prebuild }} | |
- run: ${{ matrix.command }} build --release --target ${{ matrix.target }} | |
# 7z is available on all runners. | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software | |
- name: Create archive | |
id: archive | |
shell: bash | |
run: | | |
DIRECTORY="object_store_ffi-${{ github.ref_name }}-${{ matrix.build }}" | |
mkdir "$DIRECTORY" | |
cp README.md "$DIRECTORY" | |
if [[ "${{ matrix.build }}" =~ "macos" ]]; then | |
cp "target/${{ matrix.target }}/release/libobject_store_ffi.dylib" "$DIRECTORY" | |
else | |
cp "target/${{ matrix.target }}/release/libobject_store_ffi.so" "$DIRECTORY" | |
fi | |
7z a "$DIRECTORY.zip" "$DIRECTORY" | |
echo "path=$DIRECTORY.zip" >> $GITHUB_OUTPUT | |
- env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release upload ${{ github.ref_name }} ${{ steps.archive.outputs.path }} | |
binaries: | |
needs: release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- build: linux-64-bit | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
prebuild: "sudo apt install -y musl-tools" | |
command: cargo | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.target }} | |
- run: ${{ matrix.prebuild }} | |
- run: ${{ matrix.command }} build --profile release-no-debug --target ${{ matrix.target }} --bin sfcp --features sfcp,openssl/vendored | |
- name: Copy and Output | |
id: copy | |
shell: bash | |
run: | | |
cp target/${{ matrix.target }}/release-no-debug/sfcp sfcp | |
echo "path=sfcp" >> $GITHUB_OUTPUT | |
- env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release upload ${{ github.ref_name }} ${{ steps.copy.outputs.path }} |