Skip to content

✏️ feat: add InternalServerError variant and improve error handling … #79

✏️ feat: add InternalServerError variant and improve error handling …

✏️ feat: add InternalServerError variant and improve error handling … #79

Workflow file for this run

name: Build, Publish Docker Image, and Release Binaries
on:
push:
branches:
- release
jobs:
build-and-release-binaries:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Install jq
run: sudo apt-get install -y jq
- name: Extract version from Cargo.toml
id: extract_version
run: |
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build Linux binary x86_64-gnu
run: |
cross build --target x86_64-unknown-linux-gnu --release
mkdir -p build/linux/
cp target/x86_64-unknown-linux-gnu/release/easy-proxy build/linux/easy-proxy-x86_64-linux-gnu
- name: Build Linux binary x86_64-musl
run: |
cross build --target x86_64-unknown-linux-musl --release
mkdir -p build/linux/
cp target/x86_64-unknown-linux-musl/release/easy-proxy build/linux/easy-proxy-x86_64-linux-musl
- name: Build Linux binary aarch64-gnu
run: |
cross build --target aarch64-unknown-linux-gnu --release
mkdir -p build/linux/
cp target/aarch64-unknown-linux-gnu/release/easy-proxy build/linux/easy-proxy-aarch64-linux-gnu
- name: Build Linux binary aarch64-musl
run: |
cross build --target aarch64-unknown-linux-musl --release
mkdir -p build/linux/
cp target/aarch64-unknown-linux-musl/release/easy-proxy build/linux/easy-proxy-aarch64-linux-musl
- name: Generate Checksums
run: |
cd build/linux
shasum -a 256 * > linux-checksums.txt
- name: Push binaries to release
uses: softprops/action-gh-release@v1
with:
repository: ${{ github.repository }}
files: |
build/linux/easy-proxy-x86_64-linux-gnu
build/linux/easy-proxy-x86_64-linux-musl
build/linux/easy-proxy-aarch64-linux-gnu
build/linux/easy-proxy-aarch64-linux-musl
build/linux/linux-checksums.txt
tag_name: v${{ steps.extract_version.outputs.version }}
name: v${{ steps.extract_version.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}