Skip to content

test regression fixes #106

test regression fixes

test regression fixes #106

Workflow file for this run

name: Reqvire Release
on:
push:
tags:
- "v*" # e.g. v0.1.0
permissions:
contents: write # needed to push a Release
jobs:
build:
name: Build & Package on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-15-intel]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Test
run: |
if [[ "$RUNNER_OS" == "macOS" ]]; then
# on macOS skip our two tmpdir‐symlink tests
cargo test --locked --verbose \
-- --skip test_to_relative_identifier \
--skip test_to_relative_identifier_with_github_fragments
else
# on Linux (and everywhere else) run them all
cargo test --locked --verbose
fi
- name: Build Binary
run: |
if [[ "$RUNNER_OS" == "macOS" ]]; then
if [[ "$(uname -m)" == "arm64" ]]; then
cargo build --release --locked --target aarch64-apple-darwin
else
cargo build --release --locked --target x86_64-apple-darwin
fi
elif [[ "$RUNNER_OS" == "Linux" ]]; then
rustup target add x86_64-unknown-linux-musl
cargo build --release --locked --target x86_64-unknown-linux-musl
else
echo "Unsupported platform: $RUNNER_OS"
exit 1
fi
- name: Rename Binary for OS
shell: bash
run: |
mkdir -p artifacts
if [[ "$RUNNER_OS" == "Linux" ]]; then
mv target/x86_64-unknown-linux-musl/release/reqvire artifacts/reqvire-linux-x86_64
elif [[ "$RUNNER_OS" == "macOS" ]]; then
if [[ "$(uname -m)" == "arm64" ]]; then
mv target/aarch64-apple-darwin/release/reqvire artifacts/reqvire-darwin-arm64
else
mv target/x86_64-apple-darwin/release/reqvire artifacts/reqvire-darwin-x86_64
fi
fi
- name: Debug List Built Binaries
run: ls -R artifacts
- name: Package Archives
shell: bash
run: |
cd artifacts
for file in *; do
if [[ "$file" == *.exe ]]; then
zip "${file%.exe}.zip" "$file"
else
tar -czf "${file}.tar.gz" "$file"
fi
done
- name: Upload Archives
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.os }}
path: |
artifacts/*.zip
artifacts/*.tar.gz
release:
name: Create Release & Attach Archives
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download All Archives
uses: actions/download-artifact@v4
with:
pattern: binaries-* # fetch every per-OS artifact
merge-multiple: true # put them all into one folder :contentReference[oaicite:1]{index=1}
path: artifacts
- name: Debug List Downloaded Archives
run: ls -R artifacts
- name: Create GitHub Release and Upload Archives
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: "Release ${{ github.ref_name }}"
body: "Automated release of ${{ github.ref_name }}"
draft: false
prerelease: false
files: |
artifacts/*.zip
artifacts/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}