Skip to content

Commit

Permalink
👷 Add publishing crates.io
Browse files Browse the repository at this point in the history
  • Loading branch information
mokeyish committed Dec 28, 2024
1 parent 792f582 commit 0e890ca
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,20 @@ jobs:
with:
version: ${{ needs.bump.outputs.version }}
prerelease: ${{ !contains('major, minor, patch', inputs.bump) }}

publish:
needs: [ "bump", "build" ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.bump.outputs.version }}

- name: Setup
uses: ./.github/actions/setup

- name: Publish to crates.io
run: just publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["YISH <[email protected]>"]
edition = "2021"
rust-version = "1.75.0"

keywords = ["DNS", "BIND", "dig", "named", "dnssec", "SmartDNS", "Dnsmasq"]
keywords = ["DNS", "BIND", "dig", "SmartDNS", "Dnsmasq"]
categories = ["network-programming"]

description = """
Expand All @@ -14,7 +14,7 @@ A cross platform local DNS server written in rust to obtain the fastest website

homepage = "https://github.com/mokeyish/smartdns-rs"
repository = "https://github.com/mokeyish/smartdns-rs"
license = "GPL-v3.0"
license = "GPL-3.0-only"
readme = "README.md"

[lints.rust]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SmartDNS-rs

![Test](https://github.com/mokeyish/smartdns-rs/actions/workflows/test.yml/badge.svg?branch=main)
[![Crates.io Version](https://img.shields.io/crates/v/smartdns.svg)](https://crates.io/crates/smartdns)
[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/mokeyish/smartdns-rs?display_name=tag&include_prereleases)](https://github.com/mokeyish/smartdns-rs/releases)
[![homebrew version](https://img.shields.io/homebrew/v/smartdns)](https://formulae.brew.sh/formula/smartdns)
![OS](https://img.shields.io/badge/os-Windows%20%7C%20MacOS%20%7C%20Linux-blue)
Expand Down
1 change: 1 addition & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SmartDNS-rs

![Test](https://github.com/mokeyish/smartdns-rs/actions/workflows/test.yml/badge.svg?branch=main)
[![Crates.io Version](https://img.shields.io/crates/v/smartdns.svg)](https://crates.io/crates/smartdns)
[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/mokeyish/smartdns-rs?display_name=tag&include_prereleases)](https://github.com/mokeyish/smartdns-rs/releases)
[![homebrew version](https://img.shields.io/homebrew/v/smartdns)](https://formulae.brew.sh/formula/smartdns)
![OS](https://img.shields.io/badge/os-Windows%20%7C%20MacOS%20%7C%20Linux-blue)
Expand Down
6 changes: 5 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ test *args: patch
check *args: patch
{{cargo}} check --workspace --tests --benches --examples {{args}}

# Publish
publish *args: patch
{{cargo}} publish --no-verify


# Run clippy fix
clippy: patch
Expand Down Expand Up @@ -73,4 +77,4 @@ setcap:

[private]
@require_set-version:
cargo set-version --version >/dev/null 2>&1 || cargo install cargo-edit > /dev/null
cargo set-version --version >/dev/null 2>&1 || cargo install cargo-edit > /dev/null

0 comments on commit 0e890ca

Please sign in to comment.