nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.61k stars 2.36k forks source link

CI: "nx release publish" not see changes from "nx release --skip-publish" #28750

Open de-don opened 1 week ago

de-don commented 1 week ago

Current Behavior

In Gitlab CI I want to publish packages with nx release.

When I run nx release -y it bumps versions, adds changelogs and pushes commits+tags, but tryes to publish previous version (like it's not updated).

If I run this pipeline again (in next commit), new versions will be published. So I not able to do it in single gitlab CI job.

I also tried following:

    - nx release --skip-publish

    # pull with rebase to avoid conflicts
    - git pull --rebase origin $BRANCH
    - git push origin $BRANCH --follow-tags

    # here I tries to print changed package.json - IT HAVE NEW VERSION
    - cat '....';

   # This commant tries to publish old versions, like i have not run "nx release --skip-publish"
   -  nx release publish

Expected Behavior

I could publish version in one job.

GitHub Repo

No response

Steps to Reproduce

1.

Nx Report

 NX   Report complete - copy this into the issue template

Node           : 20.17.0
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.8.2

nx                 : 19.8.0
@nx/js             : 19.8.0
@nx/jest           : 19.8.0
@nx/linter         : 19.8.0
@nx/eslint         : 19.8.0
@nx/workspace      : 19.8.0
@nx/angular        : 19.8.0
@nx/cypress        : 19.8.0
@nx/devkit         : 19.8.0
@nx/eslint-plugin  : 19.8.0
@nx/playwright     : 19.8.0
@nx/plugin         : 19.8.0
@nx/storybook      : 19.8.0
@nrwl/tao          : 19.8.0
@nrwl/vite         : 19.8.0
@nx/web            : 19.8.0
@nx/webpack        : 19.8.0
nx-cloud           : 19.1.0
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/playwright/plugin
@libs/nx-i18n
@libs/nx-linters
@libs/nx-css-utils
@libs/nx-mutation-tests
---------------------------------------
Community plugins:
@compodoc/compodoc    : 1.1.26
@libs/angular-builder : 17.0.1
@storybook/angular    : 8.3.6
nx-stylelint          : 17.1.5
---------------------------------------
Local workspace plugins:
         @libs/nx-mutation-tests
         @libs/nx-generators
         @libs/nx-migrations
         @libs/nx-css-utils
         @libs/nx-linters
         @libs/nx-utils
         @libs/nx-i18n
         @mono/generators
         @mono/executors
         @mono/utils

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

No response

de-don commented 1 week ago

Locally it works as expected

de-don commented 1 week ago

Looks like publish checkouts the git commit from CI right after start