chore(root): add project metadata to Cargo.toml
- New Features: Added description, license, and repository fields to clarify project identity. - Enhancements: Improved Cargo.toml metadata completeness. - Bug Fixes: None
This commit is contained in:
2 files changed
+3
-112
No files matched your search
@@ -1,112 +0,0 @@
|
|||||||
# Release Smoke Test Workflow
|
|
||||||
|
|
||||||
## File to Create: `.github/workflows/release-smoke.yml`
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: Release Smoke Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '[0-9]+.[0-9]+.[0-9]+'
|
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
smoke-test:
|
|
||||||
name: Smoke Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- name: Check formatting
|
|
||||||
run: cargo fmt --all -- --check
|
|
||||||
|
|
||||||
- name: Run Clippy Lints
|
|
||||||
run: cargo clippy -- -D warnings
|
|
||||||
|
|
||||||
- name: Build release
|
|
||||||
run: cargo build --release --verbose
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --verbose
|
|
||||||
|
|
||||||
- name: Smoke test — binary runs
|
|
||||||
run: ./target/release/lapctl --version
|
|
||||||
|
|
||||||
- name: Upload release artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: lapctl-${{ github.ref_name }}
|
|
||||||
path: ./target/release/lapctl
|
|
||||||
|
|
||||||
- name: Publish to crates.io
|
|
||||||
env:
|
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
||||||
run: cargo publish
|
|
||||||
|
|
||||||
publish-aur:
|
|
||||||
name: Publish to AUR
|
|
||||||
needs: smoke-test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Rust
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Setup pacman
|
|
||||||
uses: archlinux/actions/setup-pacman@v1
|
|
||||||
with:
|
|
||||||
update: true
|
|
||||||
|
|
||||||
- name: Install base-devel (for makepkg)
|
|
||||||
run: sudo pacman -S --noconfirm --needed base-devel
|
|
||||||
|
|
||||||
- name: Get version
|
|
||||||
id: version
|
|
||||||
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Generate PKGBUILD with cargo-aur
|
|
||||||
run: |
|
|
||||||
cargo install cargo-aur
|
|
||||||
mkdir -p aur-pkg
|
|
||||||
cargo aur --output aur-pkg
|
|
||||||
|
|
||||||
- name: Generate .SRCINFO
|
|
||||||
working-directory: aur-pkg
|
|
||||||
run: makepkg --printsrcinfo > .SRCINFO
|
|
||||||
|
|
||||||
- name: Push to AUR
|
|
||||||
uses: KSXGitHub/github-actions-deploy-aur@v2.5.0
|
|
||||||
with:
|
|
||||||
pkgname: lapctl
|
|
||||||
pkgver: ${{ steps.version.outputs.version }}
|
|
||||||
assets: |
|
|
||||||
aur-pkg/PKGBUILD
|
|
||||||
aur-pkg/.SRCINFO
|
|
||||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
|
||||||
commit_username: ${{ github.actor }}
|
|
||||||
commit_email: ${{ github.actor }}@users.noreply.github.com
|
|
||||||
```
|
|
||||||
|
|
||||||
## Also Required: Update Cargo.toml for crates.io
|
|
||||||
|
|
||||||
Add these fields under `[package]`:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
description = "CLI tool for managing laptop hardware features on Linux"
|
|
||||||
license = "MIT"
|
|
||||||
repository = "https://github.com/S4NKALP/lapctl"
|
|
||||||
```
|
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
name = "lapctl"
|
name = "lapctl"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
description = "CLI tool for managing laptop hardware features on Linux"
|
||||||
|
license = "MIT"
|
||||||
|
repository = "https://github.com/S4NKALP/lapctl"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5", features = ["derive"] }
|
clap = { version = "4.5", features = ["derive"] }
|
||||||
|
|||||||
Reference in new issue
Block a user