Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish to Crate.io

on:
tags:
- 'v-*'

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix flake check

build:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build

publish:
needs:
- test
- build
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: nix build
- name: cargo publish
run: |-
cargo publish --dry-run \
--all-features \
--target=${{ vars.PUBLISH_BUILD_TARGET }} \
--token=${{ secrets.CRATES_IO_API_TOKEN }}
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ categories = ["encoding"]
edition = "2024"
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/cfcosta/muhex"

[dependencies]
serde = { version = "*", optional = true }
Expand Down