diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2dc364def..df34445c1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -93,7 +93,7 @@ jobs: echo "npm_tag=$NPM_TAG" >> "$GITHUB_OUTPUT" build-native: - needs: preflight + needs: [preflight, compute-version] strategy: fail-fast: false matrix: @@ -177,6 +177,16 @@ jobs: sudo ln -sf /lib/x86_64-linux-gnu/libgcc_s.so.1 "${GNU_LIB}/libgcc_s.so" sudo ln -sf /lib/x86_64-linux-gnu/libgcc_s.so.1 "${GNU_LIB}/libgcc_s.so.1" + - name: Sync Cargo.toml version + env: + VERSION: ${{ needs.compute-version.outputs.version }} + shell: bash + run: | + [[ -n "$VERSION" ]] || { echo "::error::VERSION is empty — compute-version output missing"; exit 1; } + CARGO="crates/codegraph-core/Cargo.toml" + awk -v v="$VERSION" '!done && /^version =/{$0="version = \""v"\""; done=1}1' "$CARGO" > "${CARGO}.tmp" + mv "${CARGO}.tmp" "$CARGO" + - name: Install napi-rs CLI run: npm install -g @napi-rs/cli@3