diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63eec09e098..5d88fb8b029 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: permissions: contents: none name: CI - needs: [test, check, docs, rustfmt, clippy] + needs: [test, check, docs, rustfmt, clippy, cffconvert] runs-on: ubuntu-latest steps: - name: Done @@ -187,3 +187,15 @@ jobs: run: make clippy-full - name: Lint (release) run: make clippy-release + cffconvert: + name: cffconvert + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + persist-credentials: false + - name: CFF validation + uses: citation-file-format/cffconvert-github-action@2.0.0 + with: + args: --validate diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000000..192a4e00658 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,22 @@ +# Parser settings. +cff-version: 1.2.0 +message: Please cite this crate using these information. + +# Version information. +date-released: 2023-02-28 +version: 4.1.8 + +# Project information. +abstract: A full featured, fast Command Line Argument Parser for Rust +authors: + - alias: kbknapp + family-names: Knapp + given-names: Kevin B. + - name: The Clap Community +license: + - Apache-2.0 + - MIT +repository-artifact: https://crates.io/crates/clap +repository-code: https://github.com/clap-rs/clap +title: clap +url: https://docs.rs/clap diff --git a/Cargo.toml b/Cargo.toml index 20fbda29428..5b4f9e8c331 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,6 +57,8 @@ pre-release-replacements = [ {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD", exactly=1}, + {file="CITATION.cff", search="^date-released: ....-..-..", replace="date-released: {{date}}"}, + {file="CITATION.cff", search="^version: .+\\..+\\..+", replace="version: {{version}}"}, ] [features]