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
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build

on:
push:
branches: ["main"]
pull_request:
branches: ["*"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy, llvm-tools-preview

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install OpenAPI Generator CLI
run: |
npm install -g @openapitools/openapi-generator-cli
openapi-generator-cli version-manager set 7.16.0

- name: Build
env:
RUSTFLAGS: "-D warnings"
run: cargo build

- name: Build All Features
env:
RUSTFLAGS: "-D warnings"
run: cargo build --all-features

- name: Check Format
run: cargo fmt --all -- --check

- name: Run Clippy
timeout-minutes: 60
run: cargo clippy --all-targets --all-features -j 4 -- -D warnings

- name: Run Test
run: cargo test --all-features

- name: Check Dirty Files
run: scripts/check_dirty_files.sh
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
push:
tags:
- 'v*.*.*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Extract Version
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Publishing version: $VERSION"

- name: Verify Version
run: ./scripts/verify_version.sh ${{ steps.version.outputs.version }}

- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
Comment thread
jasonaix marked this conversation as resolved.
Loading