Skip to content

chore: bump version to 0.3.4 #13

chore: bump version to 0.3.4

chore: bump version to 0.3.4 #13

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Create GitHub release
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: |
if gh release view "$TAG" >/dev/null 2>&1; then
echo "Release $TAG already exists."
exit 0
fi
NOTES="$(printf 'Release %s\n\nSee the autogenerated changelog below for the full list of changes.' "$TAG")"
gh release create "$TAG" \
--title "$TAG" \
--notes "$NOTES" \
--generate-notes
linux_windows:
needs: create_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
- name: Install cross-compilers
run: sudo apt-get update && sudo apt-get install --yes --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross gcc-mingw-w64-x86-64-win32 musl-tools zip
- name: Install Rust targets
run: rustup target add aarch64-unknown-linux-gnu x86_64-pc-windows-gnu x86_64-unknown-linux-musl
- name: Run tests
run: cargo test --locked
- name: Build release binaries
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
run: cargo build --release --locked --target aarch64-unknown-linux-gnu --target x86_64-pc-windows-gnu --target x86_64-unknown-linux-musl
- name: Package release assets
env:
TAG: ${{ github.ref_name }}
run: |
VERSION="${TAG#v}"
tar -czf "dex_${VERSION}_linux_amd64.tar.gz" -C target/x86_64-unknown-linux-musl/release dex
tar -czf "dex_${VERSION}_linux_arm64.tar.gz" -C target/aarch64-unknown-linux-gnu/release dex
zip -j "dex_${VERSION}_windows_amd64.zip" target/x86_64-pc-windows-gnu/release/dex.exe
sha256sum "dex_${VERSION}_linux_amd64.tar.gz" > "dex_${VERSION}_linux_amd64.tar.gz.sha256"
sha256sum "dex_${VERSION}_linux_arm64.tar.gz" > "dex_${VERSION}_linux_arm64.tar.gz.sha256"
sha256sum "dex_${VERSION}_windows_amd64.zip" > "dex_${VERSION}_windows_amd64.zip.sha256"
- name: Upload release assets
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: |
VERSION="${TAG#v}"
gh release upload "$TAG" \
"dex_${VERSION}_linux_amd64.tar.gz" \
"dex_${VERSION}_linux_arm64.tar.gz" \
"dex_${VERSION}_windows_amd64.zip" \
"dex_${VERSION}_linux_amd64.tar.gz.sha256" \
"dex_${VERSION}_linux_arm64.tar.gz.sha256" \
"dex_${VERSION}_windows_amd64.zip.sha256" \
--clobber
macos:
needs: create_release
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
- name: Install Rust targets
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
- name: Build release binaries
run: cargo build --release --locked --target aarch64-apple-darwin --target x86_64-apple-darwin
- name: Package release assets
env:
TAG: ${{ github.ref_name }}
run: |
VERSION="${TAG#v}"
tar -czf "dex_${VERSION}_darwin_amd64.tar.gz" -C target/x86_64-apple-darwin/release dex
tar -czf "dex_${VERSION}_darwin_arm64.tar.gz" -C target/aarch64-apple-darwin/release dex
shasum -a 256 "dex_${VERSION}_darwin_amd64.tar.gz" > "dex_${VERSION}_darwin_amd64.tar.gz.sha256"
shasum -a 256 "dex_${VERSION}_darwin_arm64.tar.gz" > "dex_${VERSION}_darwin_arm64.tar.gz.sha256"
- name: Upload release assets
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: |
VERSION="${TAG#v}"
gh release upload "$TAG" \
"dex_${VERSION}_darwin_amd64.tar.gz" \
"dex_${VERSION}_darwin_arm64.tar.gz" \
"dex_${VERSION}_darwin_amd64.tar.gz.sha256" \
"dex_${VERSION}_darwin_arm64.tar.gz.sha256" \
--clobber