diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..e14408a5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Publish Dry Run + +on: + pull_request: + branches: [ "main", "next-major" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + release-dry-run: + name: Build and test + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + submodules: "recursive" + - name: Install stable toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust-version }} + - name: Install jq + uses: dcarbone/install-jq-action@v3 + with: + version: "1.7" + - name: Dry run publish crates + run: scripts/dry-run-publish.sh diff --git a/flake.lock b/flake.lock index f0a985dd..673a53c4 100644 --- a/flake.lock +++ b/flake.lock @@ -2,16 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1727907660, - "narHash": "sha256-QftbyPoieM5M50WKUMzQmWtBWib/ZJbHo7mhj5riQec=", + "lastModified": 1734323986, + "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5966581aa04be7eff830b9e1457d56dc70a0b798", + "rev": "394571358ce82dff7411395829aa6a3aad45b907", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 5c9baff4..8d1585fd 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Rust library for tools and encodings related to SAT solving library"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; systems.url = "github:nix-systems/default-linux"; }; diff --git a/scripts/dry-run-publish.sh b/scripts/dry-run-publish.sh new file mode 100755 index 00000000..c1026148 --- /dev/null +++ b/scripts/dry-run-publish.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +PACKAGES=$(cargo metadata --no-deps --format-version=1 | jq -r '.packages[].name') + +for PKG in ${PACKAGES}; do + cargo publish -p ${PKG} --dry-run --verbose || exit $1 +done diff --git a/shell.nix b/shell.nix index 79a8ac40..974760b6 100644 --- a/shell.nix +++ b/shell.nix @@ -12,6 +12,8 @@ in rustup cargo-rdme cargo-nextest + release-plz + jq ]; buildInputs = libs; RUSTC_VERSION = overrides.toolchain.channel;