Skip to content

Commit

Permalink
Add publish workflow for crates.io and bump package versions to 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
trinhminhtriet committed Oct 31, 2024
1 parent 9472b2a commit f4860c7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish to crates.io

on:
push:
tags:
- "v*"

jobs:
publish:
name: Publish to crates.io
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Publish libgitmgr to crates.io
run: cargo publish --manifest-path lib/libgitmgr/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Publish gitmgr to crates.io
run: cargo publish --manifest-path bin/gitmgr/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
7 changes: 0 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,3 @@ jobs:
prerelease: ${{ env.PRERELEASE }}
release_name: "gitmgr ${{ env.VERSION }}"
body: "Please refer to **[CHANGELOG.md](https://github.com/trinhminhtriet/gitmgr/blob/master/CHANGELOG.md)** for information on this release."

- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo publish -p gitmgr
cargo publish -p libgitmgr
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bin/gitmgr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gitmgr"
version = "0.1.3"
version = "0.1.4"

categories = ["command-line-utilities", "command-line-interface"]
description = "gitmgr: A command-line tool to organize, monitor, and sync multiple Git repositories with ease."
Expand All @@ -14,7 +14,7 @@ license.workspace = true
repository.workspace = true

[dependencies]
libgitmgr = { version = "0.1.3", path = "../../lib/libgitmgr" }
libgitmgr = { version = "0.1.4", path = "../../lib/libgitmgr" }

anyhow = { workspace = true }
clap = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion lib/libgitmgr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libgitmgr"
version = "0.1.3"
version = "0.1.4"

categories = ["development-tools"]
description = "Provides the ability to find a minimal set of user-relevant information for Git repositories on a local filesystem."
Expand Down

0 comments on commit f4860c7

Please sign in to comment.