Skip to content

chore: bump version to 0.10.0 (#295) #31

chore: bump version to 0.10.0 (#295)

chore: bump version to 0.10.0 (#295) #31

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build_linux:
name: build ${{ matrix.target }}
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Setup Cross
shell: bash
run: |
curl -sSfLo /tmp/cross.tar.gz https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz
tar -xzf /tmp/cross.tar.gz -C /tmp
sudo mv /tmp/cross /usr/local/bin/cross
- name: Build
shell: bash
run: |
cross build --release --target=${{ matrix.target }} --bin=bendsql
- name: Publish
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p dist
tar -czf dist/bendsql-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release bendsql
gh release upload ${{ github.ref_name }} dist/bendsql-${{ matrix.target }}.tar.gz --clobber
build_other:
name: build ${{ matrix.target }}
strategy:
matrix:
include:
- { os: macos, target: aarch64-apple-darwin }
- { os: macos, target: x86_64-apple-darwin }
# - { os: windows, target: x86_64-pc-windows-gnu }
- { os: windows, target: x86_64-pc-windows-msvc }
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Build
shell: bash
run: |
cargo build --release --target=${{ matrix.target }} --bin=bendsql
- name: Publish macOS
if: matrix.os == 'macos'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p dist
tar -czf dist/bendsql-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release bendsql
gh release upload ${{ github.ref_name }} dist/bendsql-${{ matrix.target }}.tar.gz --clobber
- name: Publish Windows
if: matrix.os == 'windows'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p dist
7z a -tzip dist/bendsql-${{ matrix.target }}.zip target/${{ matrix.target }}/release/bendsql.exe
gh release upload ${{ github.ref_name }} dist/bendsql-${{ matrix.target }}.zip --clobber
distribution:
needs: build_linux
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { packager: apk, arch: amd64, target: x86_64-unknown-linux-musl }
- { packager: apk, arch: arm64, target: aarch64-unknown-linux-musl }
- { packager: deb, arch: amd64, target: x86_64-unknown-linux-musl }
- { packager: deb, arch: arm64, target: aarch64-unknown-linux-musl }
- { packager: rpm, arch: amd64, target: x86_64-unknown-linux-musl }
- { packager: rpm, arch: arm64, target: aarch64-unknown-linux-musl }
- { packager: archlinux, arch: amd64, target: x86_64-unknown-linux-gnu }
- { packager: archlinux, arch: arm64, target: aarch64-unknown-linux-gnu }
steps:
- uses: actions/checkout@v4
- name: Setup nfpm
shell: bash
run: |
curl -sSfLo /tmp/nfpm.tar.gz https://github.com/goreleaser/nfpm/releases/download/v2.28.0/nfpm_2.28.0_Linux_x86_64.tar.gz
tar -xzf /tmp/nfpm.tar.gz -C /tmp
sudo mv /tmp/nfpm /usr/local/bin/nfpm
- name: Download
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p dist/pkg
gh release download ${{ github.ref_name }} --pattern "bendsql-${{ matrix.target }}.tar.gz" --dir dist/
tar -xzf dist/bendsql-${{ matrix.target }}.tar.gz -C dist/
- name: Package
shell: bash
run: |
export arch=${{ matrix.arch }}
export version=${{ github.ref_name }}
nfpm package --packager ${{ matrix.packager }} --target dist/pkg/ -f <(envsubst '${arch} ${version}' < nfpm.yaml)
- name: Publish
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload ${{ github.ref_name }} dist/pkg/* --clobber