From db3fbf0e62bbc863500f9268bc5b7c2d228b19d0 Mon Sep 17 00:00:00 2001 From: Mikkel ALMONTE--RINGAUD Date: Tue, 31 Dec 2024 18:06:07 +0100 Subject: [PATCH] chore: publish packages to crates.io --- .github/workflows/publish.yml | 24 +++++++++++++++++++++++- Cargo.toml | 7 +++++++ fetcher-macros/Cargo.toml | 4 ++++ fetcher/Cargo.toml | 4 ++++ wasm/Cargo.toml | 4 ++++ 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5a2316c..347af3a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,7 @@ on: - main jobs: - publish: + publish-js: runs-on: 'ubuntu-latest' permissions: @@ -38,3 +38,25 @@ jobs: run: | pnpm install && pnpm build npm publish --provenance --access public + publish-rust: + runs-on: 'ubuntu-latest' + + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + targets: x86_64-unknown-linux-gnu + + - uses: swatinem/rust-cache@v2 + with: + shared-key: "cache" + + - env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }} + run: | + cargo install cargo-release + cargo release patch --execute --no-tag diff --git a/Cargo.toml b/Cargo.toml index 012fae3..caea17e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,10 @@ members = ["wasm", "fetcher", "fetcher-macros"] [workspace.package] version = "0.1.0" +description = "Utilities for the LiterateInk crates." +homepage = "https://docs.literate.ink/utilities" +license = "MIT" +repository = "https://github.com/LiterateInk/Utilities" + +[workspace.metadata.release] +pre-release-commit-message = "chore: bump rust versions" diff --git a/fetcher-macros/Cargo.toml b/fetcher-macros/Cargo.toml index 3b8e139..2766a21 100644 --- a/fetcher-macros/Cargo.toml +++ b/fetcher-macros/Cargo.toml @@ -1,6 +1,10 @@ [package] name = "literateink-fetcher-macros" version.workspace = true +description.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true edition = "2021" [dependencies] diff --git a/fetcher/Cargo.toml b/fetcher/Cargo.toml index c260c33..9ea44a6 100644 --- a/fetcher/Cargo.toml +++ b/fetcher/Cargo.toml @@ -1,6 +1,10 @@ [package] name = "literateink-fetcher" version.workspace = true +description.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true edition = "2021" [dependencies] diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml index c1ea661..f550203 100644 --- a/wasm/Cargo.toml +++ b/wasm/Cargo.toml @@ -1,6 +1,10 @@ [package] name = "literateink-wasm" version.workspace = true +description.workspace = true +homepage.workspace = true +license.workspace = true +repository.workspace = true edition = "2021" [dependencies]