Lerna always lists all packages ready to publish when running workflow of Github actions

前端 未结 3 798
感情败类
感情败类 2021-02-10 07:18

Lerna does not correctly detect packages change during running workflow of Github actions.

  1. If I make none packages related changes, commit and runlerna up

相关标签:
3条回答
  • 2021-02-10 07:43

    After hours of debugging. I found the answer myself and thanks to @peterevans for the tip

    You have to combine both

    • fetch-depth: 0
    • run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

    so that all git history and tag are exposed to lerna.

    0 讨论(0)
  • 2021-02-10 07:59

    Wow - cannot believe that I've finally found a fix to the same issue - huge thanks!

    I see this as a big issue with github actions (specifically @actions/checkout), and thus I've informed them here: https://github.com/actions/checkout/issues/217

    I've also informed the lerna folks here: https://github.com/lerna/lerna/issues/2542

    and semantic-release people here: https://github.com/semantic-release/semantic-release/issues/1526

    Thanks again! You've helped me save a lot of time & fix an annoying issue, and I hope I'll help others with this too. Cheers

    0 讨论(0)
  • 2021-02-10 08:03

    There is also the option include-merged-tags

    So this should also solve the problem:

    lerna updated --include-merged-tags
    

    or for publishing:

    lerna publish --include-merged-tags
    
    0 讨论(0)
提交回复
热议问题