diff --git a/.github/workflows/create-release-pull-request.yml b/.github/workflows/create-release-pull-request.yml index 965d4320bdc..1139c934bd7 100644 --- a/.github/workflows/create-release-pull-request.yml +++ b/.github/workflows/create-release-pull-request.yml @@ -34,7 +34,7 @@ on: # runs every command in bash (for every job in the workflow) defaults: run: - shell: bash + shell: nix develop ./tools/nix#tooling --command bash {0} jobs: bump_crates: @@ -45,19 +45,16 @@ jobs: pull-requests: write name: Bump Crates And Create PR - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 environment: release - container: - # Note: Do not update this image has it has installed all binaries - # to bump crates and generate changelogs which we don't want installed - # in our CI packages. - image: ghcr.io/build-trust/ockam-builder@sha256:b7790a79e5fd4265d8333bb882010e5d4326778f270bd49693fa35763865df82 steps: - name: Checkout Ockam uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac with: fetch-depth: 0 + - uses: ./.github/actions/nix_installer + - name: Checkout To New Release Branch id: commit run: | diff --git a/.github/workflows/publish-crates.yml b/.github/workflows/publish-crates.yml index 5983ab17acb..fc0fd2da438 100644 --- a/.github/workflows/publish-crates.yml +++ b/.github/workflows/publish-crates.yml @@ -26,16 +26,11 @@ permissions: defaults: run: - shell: bash + shell: nix develop ./tools/nix#tooling --command bash {0} jobs: publish_crates: - runs-on: ubuntu-20.04 - container: - # Note: Do not update this image has it has installed all binaries - # to bump crates and generate changelogs which we don't want installed - # in our CI packages. - image: ghcr.io/build-trust/ockam-builder@sha256:a04b6a0aa01a93ba9a5c67392872893b261772dedfcd58f72a1addacf7535c09 + runs-on: ubuntu-22.04 environment: release name: "Publish Crates To Crates IO" steps: @@ -44,6 +39,8 @@ jobs: with: fetch-depth: 0 + - uses: ./.github/actions/nix_installer + - name: Publish Ockam Crates env: GIT_TAG: '${{ github.event.inputs.git_tag }}' diff --git a/tools/nix/flake.nix b/tools/nix/flake.nix index 43e5b4ae1ad..a52e0043034 100644 --- a/tools/nix/flake.nix +++ b/tools/nix/flake.nix @@ -20,6 +20,7 @@ # 24.1.7 stipulated by Dockerfile does not build successfully with current nixpkgs input ockam.elixir.erlangVersion = "24.3.4.10"; ockam.elixir.version = "1.13.0"; - ockam.rust.suggestedCargoPlugins = true; + ockam.rust.suggestedCargoPlugins = false; + ockam.rust.rustAnalyzer = false; }; } diff --git a/tools/nix/parts/rust.nix b/tools/nix/parts/rust.nix index 55c3f65c679..3fde8ef6947 100644 --- a/tools/nix/parts/rust.nix +++ b/tools/nix/parts/rust.nix @@ -34,7 +34,6 @@ in { devShells = let compilerTools = with pkgs; [ clang - cmake lld ]; diff --git a/tools/nix/parts/tooling.nix b/tools/nix/parts/tooling.nix index 5274a19da19..bdc81509834 100644 --- a/tools/nix/parts/tooling.nix +++ b/tools/nix/parts/tooling.nix @@ -9,17 +9,44 @@ _: { devShells.tooling = pkgs.mkShell { packages = with pkgs; [ config.packages.bats + config.packages.tomlq commitlint curl git graphviz jq which + git-cliff + cargo-release + cargo-readme + # For cargo search query + cargo + cmake + gnupg ]; BATS_LIB = "${config.packages.bats}/share/bats"; }; + packages = { + tomlq = let + pname = "tomlq"; + version = "0.1.0"; + in + pkgs.rustPlatform.buildRustPackage { + inherit pname version; + src = pkgs.fetchFromGitHub { + owner = "jamesmunns"; + repo = "tomlq"; + rev = "66b1ee60d559dd2881fc8a4e92918fb7a65bb561"; + hash = "sha256-xrdpcVywhxueNnu1vTr5o/79VyHA6BEBIAXh7Y9J/vo="; + }; + + cargoDepsName = pname; + cargoHash = "sha256-F11PsY11KOFjCnd52PjlQ3DzTbl38rzKaJfi6Y4eurM="; + }; + }; + # Responsible only for formatting this flake itself formatter = pkgs.alejandra; diff --git a/tools/scripts/release/crate-bump.sh b/tools/scripts/release/crate-bump.sh index f98be0ff543..e1bd8f70d95 100755 --- a/tools/scripts/release/crate-bump.sh +++ b/tools/scripts/release/crate-bump.sh @@ -85,7 +85,7 @@ while [[ "${updated_crates[*]}" != "${recently_updated_crates[*]}" ]]; do bumped_crates[$crate]=true echo "Bumping $crate crate" - echo y | cargo release "$version" --config tools/scripts/release/release.toml --no-push --no-publish --no-tag --no-dev-version --package "$name" --execute + cargo release "$version" --config tools/scripts/release/release.toml --no-confirm --no-sign --no-push --no-publish --no-tag --package "$name" --execute -v done recently_updated_crates="${updated_crates[@]}" diff --git a/tools/scripts/release/crate-publish.sh b/tools/scripts/release/crate-publish.sh index e44bbfd24f3..80fe9a9c184 100755 --- a/tools/scripts/release/crate-publish.sh +++ b/tools/scripts/release/crate-publish.sh @@ -79,4 +79,4 @@ if [[ $OCKAM_PUBLISH_RECENT_FAILURE == true ]]; then done fi -echo y | cargo release release --config tools/scripts/release/release.toml --no-tag --no-verify --no-dev-version $exclude_string --token "$OCKAM_PUBLISH_TOKEN" --execute +cargo release release --no-confirm --config tools/scripts/release/release.toml --no-tag --no-verify $exclude_string --token "$OCKAM_PUBLISH_TOKEN" --execute diff --git a/tools/scripts/release/release.toml b/tools/scripts/release/release.toml index 06631fde71a..33fae99c355 100644 --- a/tools/scripts/release/release.toml +++ b/tools/scripts/release/release.toml @@ -1,12 +1,7 @@ -dev-version = true -dev-version-ext = "dev" -post-release-commit-message = "chore(rust): release {{crate_name}} dev version {{version}}" push = false tag = false -verify = true -consolidate-pushes = true -sign-commit = true -pre-release-commit-message = "chore(rust): crate release {{crate_name}} version {{version}}" +sign-commit = false +sign-tag = false pre-release-replacements = [ { file = "CHANGELOG.md", min = 0, search = "## unreleased", replace = "## {{version}} - {{date}}" }, ]