Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
authors:
- dependabot
categories:
- title: New Features
labels:
- "Type: Enhancement"
- title: Bug Fixes
labels:
- "Type: Bug"
- title: Maintenance
labels:
- "Type: Maintenance"
- title: Other Changes
labels:
- "*"
85 changes: 85 additions & 0 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Release Binary

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
archive: tar.gz
- target: x86_64-apple-darwin
os: macos-latest
archive: zip
- target: aarch64-apple-darwin
os: macos-latest
archive: zip
- target: x86_64-pc-windows-msvc
os: windows-latest
archive: zip

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install musl tools
if: contains(matrix.target, 'musl')
run: sudo apt-get update && sudo apt-get install -y musl-tools

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Build
run: cargo build --release --target ${{ matrix.target }} ${{ contains(matrix.target, 'musl') && '--features vendored-openssl' || '' }}

- name: Package (Unix)
if: matrix.os != 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
if [ "${{ matrix.archive }}" = "tar.gz" ]; then
tar czf ../../../x8-${{ matrix.target }}.tar.gz x8
else
zip ../../../x8-${{ matrix.target }}.zip x8
fi

- name: Package (Windows)
if: matrix.os == 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
7z a ../../../x8-${{ matrix.target }}.zip x8.exe

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: x8-${{ matrix.target }}
path: x8-${{ matrix.target }}.*

release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: x8-*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Test

on:
pull_request:
paths:
- '**.rs'
- 'Cargo.toml'
- 'Cargo.lock'
workflow_dispatch:

jobs:
build-test:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Build
run: cargo build --release --target ${{ matrix.target }}
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ parking_lot = "0.11"
log = "0.4.14"
atty = "0.2"
async-recursion = "1.0.0"
serde = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
indicatif = "0.17.1"
linked-hash-map = "0.5.6"
strip-ansi-escapes = "0.1.1"
openssl = { version = "0.10", features = ["vendored"], optional = true }

[features]
default = []
vendored-openssl = ["openssl"]
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ async fn run(
!request_defaults.parameters.contains_key(&x.name)
&& (x.reason_kind != ReasonKind::Code || x.status == 200)
})
.map(|x| (x.get())),
.map(|x| x.get()),
));

utils::info(
Expand Down