From 78b8ddca3ab774573a4e3bf64eabd79e9452cea9 Mon Sep 17 00:00:00 2001 From: Brian Ryall Date: Thu, 11 Nov 2021 10:15:41 -0500 Subject: [PATCH] chore: publish cargo on release --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ Cargo.toml | 6 +++--- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..28bc4e2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + publish-cargo: + name: Publish Crate + runs-on: ubuntu-latest + steps: + - name: Installing Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + - name: Checking out sources + uses: actions/checkout@v1 + - name: Cache Cargo + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-publish-${{ hashFiles('**/Cargo.lock') }} + - name: Installing dependencies + run: | + sudo apt-get update + sudo apt-get install -y -qq pkg-config libssl-dev + - uses: actions-rs/cargo@v1 + with: + command: publish + args: --token ${{ secrets.CARGO_API_KEY }} --allow-dirty diff --git a/Cargo.toml b/Cargo.toml index 022fd69..d54190f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "tree-sitter-beancount" description = "beancount grammar for the tree-sitter parsing library" -version = "0.0.1" -keywords = ["incremental", "parsing", "beancount"] +version = "2.0.0" +keywords = ["incremental", "parsing", "beancount", "tree-sitter"] categories = ["parsing", "text-editors"] -repository = "https://github.com/tree-sitter/tree-sitter-beancount" +repository = "https://github.com/polarmutex/tree-sitter-beancount" edition = "2018" license = "MIT"