Snap version is not changed with "snapcraftctl set-version"

I am trying to build and publish a Snap of my application using Github workflow. It is a Rust application and I change version from Cargo.toml file (it contains version details) using shell commands and “snapcraftctl set–version”. In logs it shows that it executes snapcraftctl set-version properly but published snap contains old version only. Here is the relevant part of yaml.

  - build-on: [amd64,i386]

    plugin: rust
    source: .

    # Extract app version from Cargo.toml and set it as snap's version.
    override-pull: |
      snapcraftctl pull
      snapcraftctl set-version $(cat Cargo.toml | grep version | head -n1 | cut -d"=" -f2 | awk '{$1=$1};1')
      snapcraftctl set-grade stable
    # Build a snap here.
    override-build: |
      snapcraftctl build

    command: bin/mqttwrk
    plugs: [network] # in "strict" confinement we need to specify permission to use network.

If it’s not already there, does adding adopt-info: mqttwrk at the top level help?