diff --git a/.github/workflows/release-crates.yml b/.github/workflows/release-crates.yml new file mode 100644 index 0000000..b6dbd02 --- /dev/null +++ b/.github/workflows/release-crates.yml @@ -0,0 +1,59 @@ +name: Release crates + +on: + workflow_dispatch: + push: + branches: + - main + - master + +jobs: + # Create a PR with the new versions and changelog, preparing the next release. + open-pr: + name: Open release PR + environment: cratesio-publish + runs-on: ubuntu-latest + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 512 + + - name: Run release-plz + uses: Devolutions/actions-public/release-plz@v1 + with: + command: release-pr + manifest-path: rust/Cargo.toml + config: rust/release-plz.toml + git-name: Devolutions Bot + git-email: bot@devolutions.net + github-token: ${{ secrets.DEVOLUTIONSBOT_WRITE_TOKEN }} + + # Release unpublished packages. + release: + name: Release crates + environment: cratesio-publish + runs-on: ubuntu-latest + permissions: + id-token: write + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Authenticate with crates.io + id: auth + uses: rust-lang/crates-io-auth-action@v1 + + - name: Run release-plz + uses: Devolutions/actions-public/release-plz@v1 + with: + command: release + manifest-path: rust/Cargo.toml + config: rust/release-plz.toml + registry-token: ${{ steps.auth.outputs.token }} diff --git a/rust/crates/pinget-core/Cargo.toml b/rust/crates/pinget-core/Cargo.toml index 8eb71cc..9175273 100644 --- a/rust/crates/pinget-core/Cargo.toml +++ b/rust/crates/pinget-core/Cargo.toml @@ -4,6 +4,8 @@ version = "0.3.0" edition = "2024" description = "Pure Rust Pinget core library that works directly with source caches, REST endpoints, and installed package state without COM." license = "MIT" +readme = "README.md" +repository = "https://github.com/Devolutions/pinget" [lints] workspace = true diff --git a/rust/crates/pinget-core/README.md b/rust/crates/pinget-core/README.md new file mode 100644 index 0000000..8724a63 --- /dev/null +++ b/rust/crates/pinget-core/README.md @@ -0,0 +1,24 @@ +# pinget-core + +Pure Rust core library for [Pinget](https://github.com/Devolutions/pinget) — a cross-platform package manager that works directly with WinGet source caches, REST endpoints, and installed package state without COM. + +## Features + +- Search, list, and show package information from WinGet-compatible sources +- Install, upgrade, repair, and uninstall packages (Windows) +- Manage package sources (add, remove, update, export, reset) +- Query installed package state from multiple providers (WinGet, ARP, MSIX) +- No dependency on WinGet COM APIs + +## Usage + +Add `pinget-core` to your `Cargo.toml`: + +```toml +[dependencies] +pinget-core = "0.3" +``` + +## License + +This project is licensed under the [MIT License](https://github.com/Devolutions/pinget/blob/master/LICENSE). diff --git a/rust/release-plz.toml b/rust/release-plz.toml new file mode 100644 index 0000000..a60f4b5 --- /dev/null +++ b/rust/release-plz.toml @@ -0,0 +1,17 @@ +[workspace] +dependencies_update = true +git_release_enable = false +semver_check = true +pr_branch_prefix = "release-plz/" +pr_name = "chore(release): prepare for publishing" + +# For now, only publish pinget-core to crates.io. +[[package]] +name = "pinget-cli" +publish = false +release = false + +[[package]] +name = "pinget-com" +publish = false +release = false