Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit b7fbcfc

Browse files
committed
Add Java tssg crate release workflow
Mirrors release files we have for other tssg crates in this repo.
1 parent 8c0a017 commit b7fbcfc

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish tree-sitter-stack-graphs-java release
2+
3+
on:
4+
push:
5+
tags:
6+
- tree-sitter-stack-graphs-java-v*
7+
8+
jobs:
9+
publish-crate:
10+
runs-on: ubuntu-latest
11+
env:
12+
CARGO_TERM_COLOR: always
13+
CARGO_INCREMENTAL: 0
14+
CRATE_DIR: './languages/tree-sitter-stack-graphs-java'
15+
steps:
16+
- name: Install Rust environment
17+
uses: hecrj/setup-rust-action@v1
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
# TODO Verify the crate version matches the tag
21+
- name: Test crate
22+
run: cargo test --all-features
23+
working-directory: ${{ env.CRATE_DIR }}
24+
- name: Verify publish crate
25+
run: cargo publish --dry-run
26+
working-directory: ${{ env.CRATE_DIR }}
27+
- name: Publish crate
28+
run: cargo publish
29+
working-directory: ${{ env.CRATE_DIR }}
30+
env:
31+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
32+
create-release:
33+
needs: publish-crate
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: write
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v3
40+
- name: Create GitHub release
41+
uses: ncipollo/release-action@v1
42+
with:
43+
body: |
44+
Find more info on all releases at https://crates.io/crates/tree-sitter-stack-graphs-java.
45+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)