Merge pull request #452 from github/remve-npm-action #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |