diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62d1b556..267a84e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest strategy: - matrix: { rust: ["stable", "nightly"] } # "1.67.0", + matrix: { rust: [stable, nightly] } # "1.67.0", steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master - with: { toolchain: "${{ matrix.rust }}" } + with: { toolchain: '${{ matrix.rust }}' } - name: Run cargo check for codespan run: cargo check @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false - matrix: { rust: ["stable", "nightly"] } + matrix: { rust: [stable, nightly] } steps: - uses: actions/checkout@v4 @@ -63,17 +63,18 @@ jobs: strategy: fail-fast: false - matrix: { rust: ["stable"] } + matrix: { rust: [stable] } steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - with: { toolchain: '${{ matrix.rust }}', components: 'rustfmt' } + with: { toolchain: '${{ matrix.rust }}', components: rustfmt } - name: Run cargo fmt run: cargo fmt --all -- --check - uses: kaleidawave/release-downloader@improvements + env: { GH_TOKEN: '${{ env.GH_TOKEN }}' } with: { items: 'kaleidawave/simple-toml-parser@canary[format]' } - name: Check 'Cargo.toml' formatting @@ -88,7 +89,7 @@ jobs: strategy: fail-fast: false - matrix: { rust: ["stable"] } + matrix: { rust: [stable] } steps: - uses: actions/checkout@v4 @@ -131,14 +132,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - with: { repository: "${{ matrix.repository }}" } + with: { repository: '${{ matrix.repository }}' } - name: Run check that it works run: cargo locate-project working-directory: ${{ matrix.path }} - name: Update dependency to ${{ github.repository }} on ${{ github.head_ref }} - run: cargo add codespan-reporting --git https://github.com/${{ github.repository }} --branch ${{ github.head_ref }} + run: | + cargo add codespan-reporting --git https://github.com/${{ github.repository }} --branch ${{ github.head_ref }} working-directory: ${{ matrix.path }} - name: Run cargo tree @@ -162,6 +164,7 @@ jobs: - uses: kaleidawave/release-downloader@improvements if: steps.changes.outputs.manifests == 'true' + env: { GH_TOKEN: '${{ env.GH_TOKEN }}' } with: { items: 'kaleidawave/crates-release-gh-action@assets[crates-release]' } - name: Check that it will publish to crates.io diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 43c32083..2fc3030e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,15 +18,17 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 - - uses: rust-lang/crates-io-auth-action@v1 - id: auth + - id: checkout + uses: actions/checkout@v4 + + - id: auth + uses: rust-lang/crates-io-auth-action@v1 - name: Crates publish uses: kaleidawave/crates-release-gh-action@improvements id: release with: - version: codespan=${{ github.event.inputs.version }},codespan-reporting=${{ github.event.inputs.version }},codespan-lsp=${{ github.event.inputs.version }} + version: ${{ github.event.inputs.version }} crates-token: ${{ steps.auth.outputs.token }} - name: Push updated Cargo.toml @@ -38,4 +40,4 @@ jobs: echo '${{ steps.release.outputs.new-versions }}' | jq -r '.[]' | while read -r update; do git tag "release/$update" done - git push --tags origin main + git push --tags origin ${{ steps.checkout.outputs.ref }} diff --git a/Cargo.toml b/Cargo.toml index 8aa6929f..b5d2ed9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ members = [ "./codespan-lsp" ] resolver = "2" +metadata.version_sync = true [workspace.lints.clippy] all = { level = "deny", priority = -1 } diff --git a/codespan-lsp/Cargo.toml b/codespan-lsp/Cargo.toml index bb023432..7296ca92 100644 --- a/codespan-lsp/Cargo.toml +++ b/codespan-lsp/Cargo.toml @@ -7,6 +7,8 @@ description = "Conversions between codespan types and Language Server Protocol t homepage = "https://github.com/brendanzab/codespan" repository = "https://github.com/brendanzab/codespan" documentation = "https://docs.rs/codespan-lsp" +categories = ["compilers", "encoding"] +keywords = ["lsp", "codespan"] edition = "2021" rust-version = "1.67" diff --git a/codespan-reporting/Cargo.toml b/codespan-reporting/Cargo.toml index 05c82d14..d87622ef 100644 --- a/codespan-reporting/Cargo.toml +++ b/codespan-reporting/Cargo.toml @@ -8,6 +8,8 @@ description = "Beautiful diagnostic reporting for text-based programming languag homepage = "https://github.com/brendanzab/codespan" repository = "https://github.com/brendanzab/codespan" documentation = "https://docs.rs/codespan-reporting" +categories = ["compilers", "command-line-interface"] +keywords = ["diagnostic-reporting"] exclude = ["assets/**"] edition = "2021" rust-version = "1.67" @@ -18,10 +20,10 @@ termcolor = { version = "1.0.4", optional = true } unicode-width = ">=0.1,<0.3" [dev-dependencies] -pico-args = "0.5.0" anyhow = "1" insta = "1.6.3" peg = "0.7" +pico-args = "0.5.0" rustyline = "6" unindent = "0.1" diff --git a/codespan/Cargo.toml b/codespan/Cargo.toml index b3f9234e..047b3d0f 100644 --- a/codespan/Cargo.toml +++ b/codespan/Cargo.toml @@ -8,6 +8,8 @@ description = "Data structures for tracking locations in source code" homepage = "https://github.com/brendanzab/codespan" repository = "https://github.com/brendanzab/codespan" documentation = "https://docs.rs/codespan" +categories = ["compilers", "encoding"] +keywords = ["source-location", "serialization", "structures", "diagnostics", "tracking"] edition = "2021" rust-version = "1.67"