diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..54c12f9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,74 @@ +name: Publish + +on: + push: + tags: + - v* + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + +jobs: + publish-crate: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + + - name: Verify crate + run: cargo publish --dry-run + + - name: Publish crate + run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + publish-npm: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: "https://registry.npmjs.org" + + - name: Verify package + run: npm publish --dry-run + + - name: Publish package + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish + + create-release: + + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Create GitHub release + uses: ncipollo/release-action@v1 + with: + body: | + Find tree-sitter-java ${{ github.ref_name }} on [crates.io](https://crates.io/crates/tree-sitter-java) or [NPM](https://www.npmjs.com/package/tree-sitter-java). + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish_crate.yml b/.github/workflows/publish_crate.yml deleted file mode 100644 index cec684b..0000000 --- a/.github/workflows/publish_crate.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Publish on crates.io - -on: - push: - tags: - - v* - -env: - CARGO_TERM_COLOR: always - CARGO_INCREMENTAL: 0 - -jobs: - publish: - - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install Rust stable - run: | - rustup toolchain install stable --profile minimal --no-self-update - - - name: Verify publish crate - uses: katyo/publish-crates@v1 - with: - dry-run: true - - - name: Publish crate - uses: katyo/publish-crates@v1 - with: - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index c00d315..92477c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-java" description = "Java grammar for the tree-sitter parsing library" -version = "0.20.0" +version = "0.20.2" authors = [ "Douglas Creager ", "Ayman Nadeem ", diff --git a/Makefile b/Makefile index b91958f..dc2a743 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := 0.19.1 +VERSION := 0.20.2 # Repository SRC_DIR := src diff --git a/package.json b/package.json index f5fbcbf..073a606 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tree-sitter-java", - "version": "0.19.1", + "version": "0.20.2", "description": "Java grammar for tree-sitter", "main": "bindings/node", "keywords": [