-
Notifications
You must be signed in to change notification settings - Fork 136
45 lines (43 loc) · 1.34 KB
/
publish-tree-sitter-stack-graphs-java.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Publish tree-sitter-stack-graphs-java release
on:
push:
tags:
- tree-sitter-stack-graphs-java-v*
jobs:
publish-crate:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CRATE_DIR: './languages/tree-sitter-stack-graphs-java'
steps:
- name: Install Rust environment
uses: hecrj/setup-rust-action@v1
- name: Checkout repository
uses: actions/checkout@v3
# TODO Verify the crate version matches the tag
- name: Test crate
run: cargo test --all-features
working-directory: ${{ env.CRATE_DIR }}
- name: Verify publish crate
run: cargo publish --dry-run
working-directory: ${{ env.CRATE_DIR }}
- name: Publish crate
run: cargo publish
working-directory: ${{ env.CRATE_DIR }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
create-release:
needs: publish-crate
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 more info on all releases at https://crates.io/crates/tree-sitter-stack-graphs-java.
token: ${{ secrets.GITHUB_TOKEN }}