Skip to content

Commit

Permalink
Add ci for crate.io publish (#30)
Browse files Browse the repository at this point in the history
* Add ci for crate.io publish

* Remove release job restriction to check if working properly

* Add the tag restriction back and update the version
  • Loading branch information
glazari authored Dec 6, 2023
1 parent 0a82271 commit fc9bb96
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: TestRust
on:
push:
branches: [ "main" ]
tags:
- '*'
pull_request:
branches: [ "main" ]

Expand All @@ -22,3 +24,16 @@ jobs:
run: cargo test --verbose
- name: Run benchmarks
run: cargo bench

release:
name: Release-Crate
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [build]
steps:
- uses: actions/checkout@v3
- name: Publish crate
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustrees"
version = "0.2.0"
version = "0.2.2"
edition = "2021"
authors = [
"Guilherme Lázari <[email protected]>",
Expand Down

0 comments on commit fc9bb96

Please sign in to comment.