v0.29.1 #19
Workflow file for this run
This file contains hidden or 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: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| jobs: | |
| release_amd64: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: | |
| - stable | |
| os: | |
| - centos:7.4.1708 | |
| - centos:7.6.1810 | |
| - centos:7.7.1908 | |
| - centos:7.8.2003 | |
| - centos:7.9.2009 | |
| - ubuntu:18.04 | |
| - ubuntu:20.04 | |
| - ubuntu:22.04 | |
| - ubuntu:24.04 | |
| - fedora:41 | |
| - fedora:42 | |
| - fedora:43 | |
| - debian:11 | |
| - debian:12 | |
| - debian:13 | |
| - rhel:8.6 | |
| - rhel:8.7 | |
| - rhel:8.8 | |
| - rhel:8.9 | |
| - rhel:8.10 | |
| - rhel:9.0 | |
| - rhel:9.1 | |
| - rhel:9.2 | |
| - rhel:9.3 | |
| - rhel:9.4 | |
| - rhel:9.5 | |
| - rhel:9.6 | |
| - rhel:9.7 | |
| - rhel:10.0 | |
| - rhel:10.1 | |
| - almalinux:8.6 | |
| - almalinux:8.7 | |
| - almalinux:8.8 | |
| - almalinux:8.9 | |
| - almalinux:8.10 | |
| - almalinux:9.0 | |
| - almalinux:9.1 | |
| - almalinux:9.2 | |
| - almalinux:9.3 | |
| - almalinux:9.4 | |
| - almalinux:9.5 | |
| - almalinux:9.6 | |
| - almalinux:9.7 | |
| - almalinux:10.0 | |
| platform: | |
| - linux/amd64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: OS Build | |
| run: | | |
| export full_tgtname=${{ matrix.os }} | |
| export tgtname=$(echo ${{ matrix.os }} | tr -d ':') | |
| export full_platform=${{ matrix.platform }} | |
| export platform=$(echo ${{ matrix.platform }} | awk -F'/' '{print $NF}') | |
| .github/scripts/gen_dockerfile.sh | |
| docker build ./ -t $tgtname-$platform --platform $full_platform | |
| docker run \ | |
| -t --rm \ | |
| -v "$GITHUB_WORKSPACE:/source" \ | |
| -v "$GITHUB_WORKSPACE/target/$platform/$tgtname:/source/target" \ | |
| --platform $full_platform \ | |
| $tgtname-$platform \ | |
| cargo build --release; | |
| shell: bash | |
| - name: OS Create Package | |
| run: | | |
| export tgtname=$(echo ${{ matrix.os }} | tr -d ':') | |
| export platform=$(echo ${{ matrix.platform }} | awk -F'/' '{print $NF}') | |
| .github/scripts/package.sh $platform $tgtname; | |
| shell: bash | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.release.tag_name }} | |
| files: bender-*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| release_arm64: | |
| runs-on: ubuntu-24.04-arm | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: | |
| - stable | |
| os: | |
| - ubuntu:18.04 | |
| - ubuntu:20.04 | |
| - ubuntu:22.04 | |
| - ubuntu:24.04 | |
| platform: | |
| - linux/arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: OS Build | |
| run: | | |
| export full_tgtname=${{ matrix.os }} | |
| export tgtname=$(echo ${{ matrix.os }} | tr -d ':') | |
| export full_platform=${{ matrix.platform }} | |
| export platform=$(echo ${{ matrix.platform }} | awk -F'/' '{print $NF}') | |
| .github/scripts/gen_dockerfile.sh | |
| docker build ./ -t $tgtname-$platform --platform $full_platform | |
| docker run \ | |
| -t --rm \ | |
| -v "$GITHUB_WORKSPACE:/source" \ | |
| -v "$GITHUB_WORKSPACE/target/$platform/$tgtname:/source/target" \ | |
| --platform $full_platform \ | |
| $tgtname-$platform \ | |
| cargo build --release; | |
| shell: bash | |
| - name: OS Create Package | |
| run: | | |
| export tgtname=$(echo ${{ matrix.os }} | tr -d ':') | |
| export platform=$(echo ${{ matrix.platform }} | awk -F'/' '{print $NF}') | |
| .github/scripts/package.sh $platform $tgtname; | |
| shell: bash | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.release.tag_name }} | |
| files: bender-*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| release-gnu_amd64: | |
| runs-on: ubuntu-latest | |
| # Use container that supports old GLIBC versions and (hopefully) many linux OSs | |
| # container: quay.io/pypa/manylinux2014_x86_64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Dockerfile | |
| run: | | |
| touch Dockerfile | |
| echo "FROM quay.io/pypa/manylinux2014_x86_64" >> Dockerfile | |
| echo "RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo" >> Dockerfile | |
| echo "RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo" >> Dockerfile | |
| echo "RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo" >> Dockerfile | |
| echo "RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*" >> Dockerfile | |
| echo "RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*" >> Dockerfile | |
| echo "RUN yum group install "Development Tools" -y && yum clean all" >> Dockerfile | |
| echo 'ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo' >> Dockerfile | |
| echo 'ENV PATH=$CARGO_HOME/bin:$PATH' >> Dockerfile | |
| echo >> Dockerfile | |
| echo 'RUN mkdir -p "$CARGO_HOME" && mkdir -p "$RUSTUP_HOME" && \' >> Dockerfile | |
| echo ' curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable && \' >> Dockerfile | |
| echo ' chmod -R a=rwX $CARGO_HOME' >> Dockerfile | |
| echo >> Dockerfile | |
| echo 'WORKDIR /source' >> Dockerfile | |
| - name: OS build | |
| run: | | |
| docker build ./ -t manylinux-amd64 --platform linux/amd64 | |
| docker run \ | |
| -t --rm \ | |
| -v "$GITHUB_WORKSPACE:/source" \ | |
| -v "$GITHUB_WORKSPACE/target/amd64:/source/target" \ | |
| --platform linux/amd64 \ | |
| manylinux-amd64 \ | |
| cargo build --release; | |
| - name: GNU Create Package | |
| run: .github/scripts/package.sh amd64 | |
| shell: bash | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.release.tag_name }} | |
| files: bender-*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| release-gnu_arm64: | |
| runs-on: ubuntu-24.04-arm | |
| # Use container that supports old GLIBC versions and (hopefully) many linux OSs | |
| # container: quay.io/pypa/manylinux2014_aarch64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Dockerfile | |
| run: | | |
| touch Dockerfile | |
| echo "FROM quay.io/pypa/manylinux2014_aarch64" >> Dockerfile | |
| echo "RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo" >> Dockerfile | |
| echo "RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo" >> Dockerfile | |
| echo "RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo" >> Dockerfile | |
| echo "RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*" >> Dockerfile | |
| echo "RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*" >> Dockerfile | |
| echo "RUN yum group install "Development Tools" -y && yum clean all" >> Dockerfile | |
| echo 'ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo' >> Dockerfile | |
| echo 'ENV PATH=$CARGO_HOME/bin:$PATH' >> Dockerfile | |
| echo >> Dockerfile | |
| echo 'RUN mkdir -p "$CARGO_HOME" && mkdir -p "$RUSTUP_HOME" && \' >> Dockerfile | |
| echo ' curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable && \' >> Dockerfile | |
| echo ' chmod -R a=rwX $CARGO_HOME' >> Dockerfile | |
| echo >> Dockerfile | |
| echo 'WORKDIR /source' >> Dockerfile | |
| - name: OS build | |
| run: | | |
| docker build ./ -t manylinux-arm64 --platform linux/arm64 | |
| docker run \ | |
| -t --rm \ | |
| -v "$GITHUB_WORKSPACE:/source" \ | |
| -v "$GITHUB_WORKSPACE/target/arm64:/source/target" \ | |
| --platform linux/arm64 \ | |
| manylinux-arm64 \ | |
| cargo build --release; | |
| - name: GNU Create Package | |
| run: .github/scripts/package.sh arm64 | |
| shell: bash | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.release.tag_name }} | |
| files: bender-*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| release-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://https://sh.rustup.rs | sh -s -- -y --default-toolchain stable | |
| echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH | |
| - name: universal2 install | |
| run: | | |
| rustup target add x86_64-apple-darwin | |
| rustup target add aarch64-apple-darwin | |
| cargo install universal2 | |
| - name: MacOS Build | |
| run: cargo-universal2 --release | |
| - name: Get Artifact Name | |
| run: | | |
| if [[ "$GITHUB_REF" =~ ^refs/tags/v.*$ ]]; then \ | |
| PKG_VERSION=$(echo $GITHUB_REF | sed -n 's/^refs\/tags\/v//p'); \ | |
| else \ | |
| PKG_VERSION=$(echo $GITHUB_REF | sed -n 's/^refs\/tags\///p'); \ | |
| fi | |
| ARTIFACT_PATHNAME="bender-$PKG_VERSION-universal-apple-darwin.tar.gz" | |
| ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME) | |
| echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV | |
| echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV | |
| - name: Create Package | |
| run: | | |
| gtar -czf $ARTIFACT_PATHNAME -C "./target/universal2-apple-darwin/release" --owner=0 --group=0 bender | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.release.tag_name }} | |
| files: bender-*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| release-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Build | |
| run: cargo build --release | |
| - name: Get Artifact Name | |
| shell: bash | |
| run: | | |
| if [[ "$GITHUB_REF" =~ ^refs/tags/v.*$ ]]; then \ | |
| PKG_VERSION=$(echo $GITHUB_REF | sed -n 's/^refs\/tags\/v//p'); \ | |
| else \ | |
| PKG_VERSION=$(echo $GITHUB_REF | sed -n 's/^refs\/tags\///p'); \ | |
| fi | |
| ARTIFACT_PATHNAME="bender-$PKG_VERSION-x86_64-pc-windows-msvc.tar.gz" | |
| ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME) | |
| echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV | |
| echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV | |
| - name: Create Package | |
| run: | | |
| cp target/release/bender.exe . | |
| & 'C:\Program Files\Git\usr\bin\tar.exe' czf $Env:ARTIFACT_PATHNAME --owner=0 --group=0 bender.exe | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.release.tag_name }} | |
| files: bender-*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |