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

on:
push:
tags:
- "v[0-9]+.*"

env:
CARGO_TERM_COLOR: always

jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Using Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"

- name: Check
run: cargo check --workspace --all-targets

- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings

- name: Test
run: cargo test --workspace

publish:
needs: verify
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Publish to crates.io
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

github-release:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
6 changes: 6 additions & 0 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ jobs:

- name: Test
run: cargo test --workspace

- name: Check publishable
uses: katyo/publish-crates@v2
with:
dry-run: true
check-repo: false
15 changes: 11 additions & 4 deletions crates/plotnik-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
name = "plotnik-cli"
version = "0.1.0"
edition = "2024"
license = "MIT"
description = "CLI for plotnik - typed query language for tree-sitter AST"
repository = "https://github.com/plotnik-lang/plotnik"
documentation = "https://docs.rs/plotnik-cli"
keywords = ["tree-sitter", "query", "ast", "parser", "cli"]
categories = ["command-line-utilities", "development-tools"]
readme = "../../README.md"

[features]
default = [
Expand Down Expand Up @@ -58,7 +65,7 @@ typescript = ["plotnik-langs/typescript"]
yaml = ["plotnik-langs/yaml"]

[dependencies]
clap = { version = "=4.5.53", features = ["derive"] }
plotnik-langs = { path = "../plotnik-langs", default-features = false }
plotnik-lib = { path = "../plotnik-lib" }
tree-sitter = "=0.25.10"
clap = { version = "4.5", features = ["derive"] }
plotnik-langs = { version = "0.1.0", path = "../plotnik-langs", default-features = false }
plotnik-lib = { version = "0.1.0", path = "../plotnik-lib" }
tree-sitter = "0.25"
9 changes: 8 additions & 1 deletion crates/plotnik-langs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
name = "plotnik-langs"
version = "0.1.0"
edition = "2024"
license = "MIT"
description = "Tree-sitter language bindings for Plotnik query language"
repository = "https://github.com/plotnik-lang/plotnik"
documentation = "https://docs.rs/plotnik-langs"
keywords = ["tree-sitter", "parser", "languages"]
categories = ["parsing", "development-tools"]
readme = "../../README.md"

[features]
default = [
Expand Down Expand Up @@ -85,4 +92,4 @@ tree-sitter-swift = { version = "0.7.0", optional = true }
tree-sitter-typescript = { version = "0.23.2", optional = true }
tree-sitter-yaml = { version = "0.7.0", optional = true }

[dev-dependencies]
[dev-dependencies]
7 changes: 7 additions & 0 deletions crates/plotnik-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
name = "plotnik-lib"
version = "0.1.0"
edition = "2024"
license = "MIT"
description = "Typed query language for tree-sitter AST"
repository = "https://github.com/plotnik-lang/plotnik"
documentation = "https://docs.rs/plotnik-lib"
readme = "../../README.md"
keywords = ["tree-sitter", "query", "ast", "parser"]
categories = ["parsing", "development-tools"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
Expand Down
8 changes: 8 additions & 0 deletions release.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
allow-branch = ["master"]
shared-version = true
consolidate-commits = true

pre-release-commit-message = "chore: release v{{version}}"
tag-prefix = ""
tag-name = "v{{version}}"
tag-message = "v{{version}}"
Loading