Bump version number and update CHANGELOG.md for 1.2.0 release #120
Workflow file for this run
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
linux_x86_64: | |
name: Linux (x86-64) | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Rust | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Install MUSL Toolchain | |
run: rustup target add x86_64-unknown-linux-musl | |
- name: Install MUSL dependencies | |
run: sudo apt-get install musl-tools | |
- name: Enable Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Release Build | |
run: cargo build --release --all --target x86_64-unknown-linux-musl | |
- name: Execute Tests | |
run: cargo test --release --all --target x86_64-unknown-linux-musl | |
- name: Run Clippy | |
run: cargo clippy --release --all --target x86_64-unknown-linux-musl --all-targets --all-features --locked -- -D warnings | |
- name: Check Formatting | |
run: cargo fmt --all -- --check | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: linux-x86_64 | |
path: target/x86_64-unknown-linux-musl/release/dmarc-report-viewer | |
linux_aarch64: | |
name: Linux (aarch64) | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Rust | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Install Cargo Binary Install | |
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | |
- name: Install Cargo Cross | |
run: cargo binstall cross --no-confirm | |
- name: Enable Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Release Build | |
run: cross build --release --all --target aarch64-unknown-linux-musl | |
- name: Execute Tests | |
run: cross test --release --all --target aarch64-unknown-linux-musl | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: linux-aarch64 | |
path: target/aarch64-unknown-linux-musl/release/dmarc-report-viewer | |
windows_x86_64: | |
name: Windows (x86-64) | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install NASM | |
uses: ilammy/setup-nasm@v1 | |
- name: Update Rust | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Enable Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Release Build | |
run: cargo build --release --all | |
- name: Execute Tests | |
run: cargo test --release --all | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: windows-x86_64 | |
path: target/release/dmarc-report-viewer.exe | |
mac_x86_64: | |
name: Mac (x86-64) | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Rust | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Install x64 target | |
run: rustup target add x86_64-apple-darwin | |
- name: Enable Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Release Build | |
run: cargo build --release --all --target x86_64-apple-darwin | |
- name: Execute Tests | |
run: cargo test --release --all --target x86_64-apple-darwin | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mac-x86_64 | |
path: target/x86_64-apple-darwin/release/dmarc-report-viewer | |
mac_aarch64: | |
name: Mac (aarch64) | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Rust | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Enable Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Release Build | |
run: cargo build --release --all --target aarch64-apple-darwin | |
- name: Execute Tests | |
run: cargo test --release --all --target aarch64-apple-darwin | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mac-aarch64 | |
path: target/aarch64-apple-darwin/release/dmarc-report-viewer | |
docker_linux: | |
name: Docker (Linux, x86-64, aarch64) | |
needs: [linux_x86_64, linux_aarch64] | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Prepare Binary Artifacts | |
run: | | |
mv linux-x86_64 .github/docker/linux-amd64 | |
mv linux-aarch64 .github/docker/linux-arm64 | |
chmod +x .github/docker/linux-amd64/dmarc-report-viewer | |
chmod +x .github/docker/linux-arm64/dmarc-report-viewer | |
- name: Build Docker Images | |
run: | | |
cd .github/docker/ | |
docker builder create --name builder | |
docker buildx build --builder builder --platform=linux/amd64,linux/arm64 --pull . | |
- name: Build Develop Docker Images | |
if: ${{github.ref == 'refs/heads/master'}} | |
run: | | |
cd .github/docker/ | |
echo ${{secrets.GITHUB_TOKEN}} | docker login ghcr.io -u ${{github.actor}} --password-stdin | |
docker buildx build --builder builder --platform=linux/amd64,linux/arm64 --pull --push --tag ghcr.io/${{github.actor}}/dmarc-report-viewer:develop . | |
docker run --rm ghcr.io/${{github.actor}}/dmarc-report-viewer:develop ./dmarc-report-viewer --version | |
- name: Build Release Docker Images | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
cd .github/docker/ | |
echo ${{secrets.GITHUB_TOKEN}} | docker login ghcr.io -u ${{github.actor}} --password-stdin | |
docker buildx build --builder builder --platform=linux/amd64,linux/arm64 --pull --push --tag ghcr.io/${{github.actor}}/dmarc-report-viewer:latest --tag ghcr.io/${{github.actor}}/dmarc-report-viewer:${{github.ref_name}} . | |
docker run --rm ghcr.io/${{github.actor}}/dmarc-report-viewer:latest ./dmarc-report-viewer --version | |
release: | |
name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [linux_x86_64, linux_aarch64, windows_x86_64, mac_x86_64, mac_aarch64, docker_linux] | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Pack Artifacts for Release | |
run: | | |
zip -r windows-x86_64.zip windows-x86_64 | |
zip -r linux-x86_64.zip linux-x86_64 | |
zip -r linux-aarch64.zip linux-aarch64 | |
zip -r mac-x86_64.zip mac-x86_64 | |
zip -r mac-aarch64.zip mac-aarch64 | |
- name: Publish Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
body: Release created automatically from git tag ${{github.ref_name}}, see CHANGELOG.md for more details. | |
files: | | |
CHANGELOG.md | |
LICENSE | |
windows-x86_64.zip | |
linux-x86_64.zip | |
linux-aarch64.zip | |
mac-x86_64.zip | |
mac-aarch64.zip |