-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move usage-lib into its own dir
- Loading branch information
Showing
34 changed files
with
168 additions
and
232 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: publish-cli | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
concurrency: | ||
group: release-${{ github.ref_name }} | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
|
||
jobs: | ||
publish-cli: | ||
if: github.repository_owner == 'jdx' && startsWith(github.event.release.name, 'usage-v') | ||
strategy: | ||
matrix: | ||
include: | ||
- target: universal-apple-darwin | ||
os: macos-14 | ||
- target: x86_64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: x86_64-unknown-linux-musl | ||
os: ubuntu-latest | ||
- target: aarch64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: aarch64-unknown-linux-musl | ||
os: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
- uses: taiki-e/upload-rust-binary-action@v1 | ||
with: | ||
bin: usage | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
target: ${{ matrix.target }} | ||
manifest-path: cli/Cargo.toml | ||
env: | ||
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 | ||
CARGO_PROFILE_RELEASE_LTO: true | ||
bump-homebrew-formula: | ||
runs-on: macos-14 | ||
timeout-minutes: 10 | ||
needs: [publish-cli] | ||
continue-on-error: true | ||
steps: | ||
- name: Bump Homebrew formula | ||
uses: dawidd6/action-homebrew-bump-formula@v3 | ||
with: | ||
token: ${{ secrets.GH_BOT_TOKEN }} | ||
formula: usage | ||
tap: jdx/homebrew-tap |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Release-plz | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-plz: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Run release-plz | ||
uses: MarcoIeni/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,20 @@ | ||
[package] | ||
name = "usage-lib" | ||
edition = "2021" | ||
version = "0.1.9" | ||
rust-version = "1.70.0" | ||
include = [ | ||
"/Cargo.toml", | ||
"/Cargo.lock", | ||
"/README.md", | ||
"/LICENSE", | ||
"/src/**/*.rs", | ||
] | ||
description.workspace = true | ||
homepage.workspace = true | ||
documentation.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
|
||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"cli", | ||
"lib", | ||
] | ||
|
||
[workspace.package] | ||
description = "Library for working with usage specs" | ||
version = "0.1.9" | ||
homepage = "https://usage.jdx.dev" | ||
documentation = "https://github.com/jdx/usage" | ||
authors = ["Jeff Dickey @jdx"] | ||
license = "MIT" | ||
|
||
[workspace.dependencies] | ||
kdl = "4" | ||
|
||
[lib] | ||
name = "usage" | ||
|
||
[dependencies] | ||
clap = { version = "4", features = ["derive", "string"], optional = true } | ||
heck = "0.5.0" | ||
indexmap = { version = "2", features = ["serde"] } | ||
itertools = "0.12" | ||
log = "0.4" | ||
kdl.workspace = true | ||
miette = "5" | ||
once_cell = "1" | ||
serde = { version = "1", features = ["derive"] } | ||
shell-escape = "0.1" | ||
strum = { version = "0.26", features = ["derive"] } | ||
thiserror = "1" | ||
xx = "0.2" | ||
|
||
[features] | ||
default = ["clap"] | ||
|
||
[dev-dependencies] | ||
ctor = "0.2" | ||
insta = "1" | ||
usage-cli = { path = "cli" } | ||
usage-lib = { path = "lib" } | ||
|
||
[package.metadata.release] | ||
[workspace.metadata.release] | ||
allow-branch = ["main"] | ||
sign-commit = true | ||
sign-tag = true | ||
shared-version = true | ||
pre-release-hook = ["git", "cliff", "-o", "CHANGELOG.md", "--tag", "{{version}}" ] |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.