Skip to content
Merged
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
60 changes: 60 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

permissions:
contents: write

on:
push:
# Run on x.y.z tags.
tags:
- "**[0-9]+.[0-9]+.[0-9]+*"
# Allow manual triggering.
workflow_dispatch:

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- os: ubuntu-22.04-arm
target: aarch64-unknown-linux-gnu
- os: macos-14
target: aarch64-apple-darwin

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build & test & rename
run: |
mv .cargo/config-portable.toml .cargo/config.toml
cargo build --profile dist
cargo test --profile dist

mkdir artifacts
mv target/dist/deacon artifacts/deacon-${{ matrix.target }}

- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}
path: artifacts

release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: release_artifacts

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: release_artifacts/**/*
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 5 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Tests
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
Expand All @@ -19,12 +20,6 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --verbose
run: cargo test --verbose
Loading