Skip to content

oxidized-mc/ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Oxidized MC — Reusable CI/CD Workflows

Centralized, modular GitHub Actions workflows for every repository in the Oxidized MC ecosystem.

Workflows

Universal (all Rust crates)

Workflow File Description
Rust CI rust-ci.yml Lint (fmt + clippy @ MSRV), test (cross-OS), cargo-deny, MSRV check
Commit Lint commit-lint.yml Conventional commit validation
Security Audit security-audit.yml cargo-audit advisory scanning

Binary projects (server, client-headless)

Workflow File Description
Release Please release-please.yml Automated release PRs and changelogs
Cargo Publish cargo-publish.yml Publish crate to crates.io on release
Dev Release dev-release.yml Nightly binary builds (5 targets)
Release Binaries release-binaries.yml Stable release builds on tag
Docker docker.yml Multi-arch Docker images to GHCR

Usage

Library crate (minimal)

# .github/workflows/ci.yml
name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  ci:
    uses: oxidized-mc/ci/.github/workflows/rust-ci.yml@main
# .github/workflows/commit-lint.yml
name: Commit Lint
on:
  pull_request:
    branches: [main]
jobs:
  lint:
    uses: oxidized-mc/ci/.github/workflows/commit-lint.yml@main
    with:
      scopes: "deps"
# .github/workflows/security.yml
name: Security Audit
on:
  push:
    paths: ['**/Cargo.toml', '**/Cargo.lock']
  schedule:
    - cron: '0 8 * * 1'
jobs:
  audit:
    uses: oxidized-mc/ci/.github/workflows/security-audit.yml@main

Library crate release pipeline

# .github/workflows/release-please.yml
name: Release Please
on:
  push:
    branches: [main]
jobs:
  release:
    uses: oxidized-mc/ci/.github/workflows/release-please.yml@main
# .github/workflows/cargo-publish.yml
name: Publish to crates.io
on:
  release:
    types: [published]
jobs:
  publish:
    uses: oxidized-mc/ci/.github/workflows/cargo-publish.yml@main
    secrets:
      CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

Workspace crate (server)

# .github/workflows/ci.yml
name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  ci:
    uses: oxidized-mc/ci/.github/workflows/rust-ci.yml@main
    with:
      workspace: true
      cache-hash-file: "**/Cargo.lock"

Binary project (full pipeline)

# .github/workflows/dev-release.yml
name: Dev Release
on:
  workflow_run:
    workflows: ["CI"]
    types: [completed]
    branches: [main]
jobs:
  release:
    if: github.event.workflow_run.conclusion == 'success'
    uses: oxidized-mc/ci/.github/workflows/dev-release.yml@main
    with:
      binary-name: oxidized
      package-name: oxidized-server
# .github/workflows/release-binaries.yml
name: Release Binaries
on:
  release:
    types: [published]
jobs:
  build:
    uses: oxidized-mc/ci/.github/workflows/release-binaries.yml@main
    with:
      binary-name: oxidized
      package-name: oxidized-server
# .github/workflows/docker.yml
name: Docker
on:
  workflow_run:
    workflows: ["CI"]
    types: [completed]
    branches: [main]
  release:
    types: [published]
jobs:
  docker:
    uses: oxidized-mc/ci/.github/workflows/docker.yml@main

Inputs Reference

rust-ci.yml

Input Type Default Description
msrv string 1.85 Minimum supported Rust version
toolchain string stable Rust toolchain for tests
workspace boolean false Use --workspace flag
cache-hash-file string **/Cargo.toml File glob for cache key
extra-clippy-args string "" Additional clippy arguments
check-no-default-features boolean true Run no-default-features check
test-platforms string ["ubuntu-latest", "windows-latest", "macos-latest"] OS matrix (JSON)
cargo-deny boolean true Run cargo-deny

commit-lint.yml

Input Type Default Description
types string feat,fix,perf,refactor,test,docs,chore,ci Allowed commit types
scopes string deps Allowed commit scopes
max-header-length number 100 Max header length

security-audit.yml

Input Type Default Description
ignore string "" Comma-separated RUSTSEC IDs to ignore

cargo-publish.yml

Input Type Default Description
crate-name string "" Crate name (logging only)
toolchain string stable Rust toolchain
dry-run boolean false Dry run without publishing

Required secret: CARGO_REGISTRY_TOKEN (crates.io API token)

dev-release.yml / release-binaries.yml

Input Type Required Description
binary-name string Output binary name
package-name string Cargo package (-p flag)
extra-files string Extra files to include

License

MIT — see LICENSE.

About

Reusable GitHub Actions workflows for the Oxidized MC ecosystem

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors