Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed step "prepare" of plugin "@semantic-release/npm" due to reading malformed path #773

Open
joshunrau opened this issue Apr 7, 2024 · 6 comments

Comments

@joshunrau
Copy link

joshunrau commented Apr 7, 2024

Recently, when running semantic-release on GitHub Actions this plugin is causing an error due to trying reading a path that doesn't make any sense. From what I can tell, it seems to be reading input from stdout of other commands and inserting it into the path.

I have been experimenting on a package I created to setup semantic-release for other packages, so all of the errors and code are public.

As you can see in this workflow run, this is the error that is occurring:

[6:00:22 PM] [semantic-release] [@semantic-release/npm] › ℹ  Creating npm package version 0.1.2

> @joshunrau/semantic-release@0.1.2 prepare
> husky

npm notice 
npm notice 📦  @joshunrau/semantic-release@0.1.2
npm notice === Tarball Contents === 
npm notice 1.1kB LICENSE       
npm notice 1.8kB README.md     
npm notice 95B   bin/cli.js    
npm notice 1.8kB package.json  
npm notice 82B   src/index.d.ts
npm notice 786B  src/index.js  
npm notice === Tarball Details === 
npm notice name:          @joshunrau/semantic-release             
npm notice version:       0.1.2                                   
npm notice filename:      joshunrau-semantic-release-0.1.2.tgz    
npm notice package size:  2.6 kB                                  
npm notice unpacked size: 5.7 kB                                  
npm notice shasum:        3383e03fb545881b87b2414fce8c9be5b5d66173
npm notice integrity:     sha512-Um1jZMbnodS0q[...]14WuidIyC/aow==
npm notice total files:   6                                       
npm notice 
HUSKY=0 skip installjoshunrau-semantic-release-0.1.2.tgz
[6:00:24 PM] [semantic-release] › ✘  Failed step "prepare" of plugin "@semantic-release/npm"
[6:00:24 PM] [semantic-release] › ✘  An error occurred while running semantic-release: [Error: ENOENT: no such file or directory, lstat '/home/runner/work/semantic-release/semantic-release/HUSKY=0 skip installjoshunrau-semantic-release-0.1.2.tgz'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/home/runner/work/semantic-release/semantic-release/HUSKY=0 skip installjoshunrau-semantic-release-0.1.2.tgz',
  pluginName: '@semantic-release/npm'
}
[Error: ENOENT: no such file or directory, lstat '/home/runner/work/semantic-release/semantic-release/HUSKY=0 skip installjoshunrau-semantic-release-0.1.2.tgz'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/home/runner/work/semantic-release/semantic-release/HUSKY=0 skip installjoshunrau-semantic-release-0.1.2.tgz',
  pluginName: '@semantic-release/npm'
}

I need to set HUSKY = 0 in the environment to prevent commitlint from blocking my release due to lengthy commit messages generated by other plugins.

If I remove the { prepare: "husky" } script from my package.json, the problem doesn't occur. However, last week it was working with the same command and versions. Also, when I run semantic-release with the --debug flag, the problem doesn't occur.

Any help would be appreciated.

Thanks

EDIT: Actually, on my eslint-config repo, the same error occurred with the --debug flag (see https://github.com/joshunrau/eslint-config/actions/runs/8590757046/job/23538694193).

@travi
Copy link
Member

travi commented Apr 7, 2024

Have you tried with npx rather than pnpx?

@BinToss
Copy link

BinToss commented Apr 8, 2024

I'm unable to reproduce the issue locally.

Maybe something in the GitHub runner changed.

What's the output of npm pack or the equivalent for pnpm?

npm pack:

> @joshunrau/semantic-release@0.1.2 prepare
> husky

npm notice
npm notice package: @joshunrau/semantic-release@0.1.2
npm notice === Tarball Contents ===
npm notice 1.1kB LICENSE
npm notice 1.8kB README.md
npm notice 95B   bin/cli.js
npm notice 1.8kB package.json
npm notice 82B   src/index.d.ts
npm notice 786B  src/index.js
npm notice === Tarball Details ===
npm notice name:          @joshunrau/semantic-release
npm notice version:       0.1.2
npm notice filename:      joshunrau-semantic-release-0.1.2.tgz
npm notice package size:  2.5 kB
npm notice unpacked size: 5.7 kB
npm notice shasum:        22e805f8c09c38a988717c5d7d440280717139c0
npm notice integrity:     sha512-1katMZMzV6KBa[...]Lf6qYbu2myKFQ==
npm notice total files:   6
npm notice
joshunrau-semantic-release-0.1.2.tgz

pnpm pack:

> @joshunrau/semantic-release@0.1.2 prepare C:\Repos\semantic-release
> husky

joshunrau-semantic-release-0.1.2.tgz

pnpm exec semantic-release --ci=false --dry-run=false with url set to a local directory path and GitHub plugin removed from load order:

pnpm exec semantic-release --ci=false --dry-run=false
[6:37:48 PM] [semantic-release] » ℹ  Running semantic-release version 23.0.7
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "prepare" from "@semantic-release/git"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "publish" from "@semantic-release/npm"
[6:37:48 PM] [semantic-release] » ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[6:37:50 PM] [semantic-release] » ✔  Run automated release from branch main on repository C:\Repos\semantic-release - Copy
[6:37:50 PM] [semantic-release] » ✔  Allowed to push to the Git repository
[6:37:50 PM] [semantic-release] » ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[6:37:50 PM] [semantic-release] » ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[6:37:50 PM] [semantic-release] » ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
[6:37:50 PM] [semantic-release] [@semantic-release/npm] » ℹ  Verify authentication for registry http://localhost:4873/
[6:37:50 PM] [semantic-release] [@semantic-release/npm] » ℹ  Reading npm config from C:\Users\Noah\.npmrc
[6:37:50 PM] [semantic-release] » ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
[6:37:50 PM] [semantic-release] » ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
[6:37:50 PM] [semantic-release] » ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
[6:37:50 PM] [semantic-release] » ℹ  Found git tag v0.1.2 associated with version 0.1.2 on branch main
[6:37:50 PM] [semantic-release] » ℹ  Found 2 commits since last release
[6:37:50 PM] [semantic-release] » ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[6:37:50 PM] [semantic-release] [@semantic-release/commit-analyzer] » ℹ  Analyzing commit: fix: remove GH plugin
[6:37:50 PM] [semantic-release] [@semantic-release/commit-analyzer] » ℹ  The release type for the commit is patch
[6:37:50 PM] [semantic-release] [@semantic-release/commit-analyzer] » ℹ  Analyzing commit: chore: change url for local push
[6:37:50 PM] [semantic-release] [@semantic-release/commit-analyzer] » ℹ  The commit should not trigger a release
[6:37:50 PM] [semantic-release] [@semantic-release/commit-analyzer] » ℹ  Analysis of 2 commits complete: patch release
[6:37:50 PM] [semantic-release] » ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[6:37:50 PM] [semantic-release] » ℹ  The next release version is 0.1.3
[6:37:50 PM] [semantic-release] » ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[6:37:50 PM] [semantic-release] » ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[6:37:50 PM] [semantic-release] » ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[6:37:50 PM] [semantic-release] [@semantic-release/changelog] » ℹ  Update C:\Repos\semantic-release\CHANGELOG.md
[6:37:50 PM] [semantic-release] » ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[6:37:50 PM] [semantic-release] » ℹ  Start step "prepare" of plugin "@semantic-release/npm"
[6:37:50 PM] [semantic-release] [@semantic-release/npm] » ℹ  Write version 0.1.3 to package.json in C:\Repos\semantic-release
v0.1.3
[6:37:57 PM] [semantic-release] [@semantic-release/npm] » ℹ  Creating npm package version 0.1.3

> @joshunrau/semantic-release@0.1.3 prepare
> husky

npm notice
npm notice package: @joshunrau/semantic-release@0.1.3
npm notice === Tarball Contents ===
npm notice 1.1kB LICENSE
npm notice 1.8kB README.md
npm notice 95B   bin/cli.js
npm notice 1.7kB package.json
npm notice 82B   src/index.d.ts
npm notice 804B  src/index.js
npm notice === Tarball Details ===
npm notice name:          @joshunrau/semantic-release
npm notice version:       0.1.3
npm notice filename:      joshunrau-semantic-release-0.1.3.tgz
npm notice package size:  2.6 kB
npm notice unpacked size: 5.6 kB
npm notice shasum:        9b564da782babfa81874b4af77a7700134c4f4bf
npm notice integrity:     sha512-O/bDm3PmdCMBk[...]Ezox5PdbV7H1w==
npm notice total files:   6
npm notice
joshunrau-semantic-release-0.1.3.tgz
[6:38:00 PM] [semantic-release] » ✔  Completed step "prepare" of plugin "@semantic-release/npm"
[6:38:00 PM] [semantic-release] » ℹ  Start step "prepare" of plugin "@semantic-release/git"
[6:38:01 PM] [semantic-release] [@semantic-release/git] » ℹ  Found 2 file(s) to commit
[6:38:04 PM] [semantic-release] » ✘  Failed step "prepare" of plugin "@semantic-release/git"
[6:38:04 PM] [semantic-release] » ✘  An error occurred while running semantic-release: Error: Command failed with exit code 1: git push --tags C:\Repos\semantic-release - Copy HEAD:main
remote: error: refusing to update checked out branch: refs/heads/main
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To C:\Repos\semantic-release - Copy
 * [new tag]         v0.1.2 -> v0.1.2
 ! [remote rejected] HEAD -> main (branch is currently checked out)
error: failed to push some refs to 'C:\Repos\semantic-release - Copy'
    at makeError (C:\Repos\semantic-release\node_modules\.pnpm\execa@5.1.1\node_modules\execa\lib\error.js:60:11)
    at handlePromise (C:\Repos\semantic-release\node_modules\.pnpm\execa@5.1.1\node_modules\execa\index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async push (C:\Repos\semantic-release\node_modules\.pnpm\@semantic-release+git@10.0.1_semantic-release@23.0.7\node_modules\@semantic-release\git\lib\git.js:51:3)
    at async module.exports (C:\Repos\semantic-release\node_modules\.pnpm\@semantic-release+git@10.0.1_semantic-release@23.0.7\node_modules\@semantic-release\git\lib\prepare.js:69:5)
    at async prepare (C:\Repos\semantic-release\node_modules\.pnpm\@semantic-release+git@10.0.1_semantic-release@23.0.7\node_modules\@semantic-release\git\index.js:28:3)
    at async validator (file:///C:/Repos/semantic-release/node_modules/.pnpm/semantic-release@23.0.7_typescript@5.4.3/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
    at async file:///C:/Repos/semantic-release/node_modules/.pnpm/semantic-release@23.0.7_typescript@5.4.3/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
    at async file:///C:/Repos/semantic-release/node_modules/.pnpm/semantic-release@23.0.7_typescript@5.4.3/node_modules/semantic-release/lib/plugins/pipeline.js:32:5
    at async pluginsConfigAccumulator.<computed> [as prepare] (file:///C:/Repos/semantic-release/node_modules/.pnpm/semantic-release@23.0.7_typescript@5.4.3/node_modules/semantic-release/lib/plugins/index.js:87:11) {
  shortMessage: 'Command failed with exit code 1: git push --tags C:\\Repos\\semantic-release - Copy HEAD:main',
  command: 'git push --tags C:\\Repos\\semantic-release - Copy HEAD:main',
  escapedCommand: 'git push --tags "C:\\Repos\\semantic-release - Copy" "HEAD:main"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'remote: error: refusing to update checked out branch: refs/heads/main        \n' +
    'remote: error: By default, updating the current branch in a non-bare repository        \n' +
    'remote: is denied, because it will make the index and work tree inconsistent        \n' +
    "remote: with what you pushed, and will require 'git reset --hard' to match        \n" +
    'remote: the work tree to HEAD.        \n' +
    'remote: \n' +
    "remote: You can set the 'receive.denyCurrentBranch' configuration variable        \n" +
    "remote: to 'ignore' or 'warn' in the remote repository to allow pushing into        \n" +
    'remote: its current branch; however, this is not recommended unless you        \n' +
    'remote: arranged to update its work tree to match what you pushed in some        \n' +
    'remote: other way.        \n' +
    'remote: \n' +
    'remote: To squelch this message and still keep the default behaviour, set        \n' +
    "remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.        \n" +
    'To C:\\Repos\\semantic-release - Copy\n' +
    ' * [new tag]         v0.1.2 -> v0.1.2\n' +
    ' ! [remote rejected] HEAD -> main (branch is currently checked out)\n' +
    "error: failed to push some refs to 'C:\\Repos\\semantic-release - Copy'",
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false,
  pluginName: '@semantic-release/git'
}
Error: Command failed with exit code 1: git push --tags C:\Repos\semantic-release - Copy HEAD:main
remote: error: refusing to update checked out branch: refs/heads/main
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To C:\Repos\semantic-release - Copy
 * [new tag]         v0.1.2 -> v0.1.2
 ! [remote rejected] HEAD -> main (branch is currently checked out)
error: failed to push some refs to 'C:\Repos\semantic-release - Copy'
    at makeError (C:\Repos\semantic-release\node_modules\.pnpm\execa@5.1.1\node_modules\execa\lib\error.js:60:11)
    at handlePromise (C:\Repos\semantic-release\node_modules\.pnpm\execa@5.1.1\node_modules\execa\index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async push (C:\Repos\semantic-release\node_modules\.pnpm\@semantic-release+git@10.0.1_semantic-release@23.0.7\node_modules\@semantic-release\git\lib\git.js:51:3)
    at async module.exports (C:\Repos\semantic-release\node_modules\.pnpm\@semantic-release+git@10.0.1_semantic-release@23.0.7\node_modules\@semantic-release\git\lib\prepare.js:69:5)
    at async prepare (C:\Repos\semantic-release\node_modules\.pnpm\@semantic-release+git@10.0.1_semantic-release@23.0.7\node_modules\@semantic-release\git\index.js:28:3)
    at async validator (file:///C:/Repos/semantic-release/node_modules/.pnpm/semantic-release@23.0.7_typescript@5.4.3/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
    at async file:///C:/Repos/semantic-release/node_modules/.pnpm/semantic-release@23.0.7_typescript@5.4.3/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
    at async file:///C:/Repos/semantic-release/node_modules/.pnpm/semantic-release@23.0.7_typescript@5.4.3/node_modules/semantic-release/lib/plugins/pipeline.js:32:5
    at async pluginsConfigAccumulator.<computed> [as prepare] (file:///C:/Repos/semantic-release/node_modules/.pnpm/semantic-release@23.0.7_typescript@5.4.3/node_modules/semantic-release/lib/plugins/index.js:87:11) {
  shortMessage: 'Command failed with exit code 1: git push --tags C:\\Repos\\semantic-release - Copy HEAD:main',
  command: 'git push --tags C:\\Repos\\semantic-release - Copy HEAD:main',
  escapedCommand: 'git push --tags "C:\\Repos\\semantic-release - Copy" "HEAD:main"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'remote: error: refusing to update checked out branch: refs/heads/main        \n' +
    'remote: error: By default, updating the current branch in a non-bare repository        \n' +
    'remote: is denied, because it will make the index and work tree inconsistent        \n' +
    "remote: with what you pushed, and will require 'git reset --hard' to match        \n" +
    'remote: the work tree to HEAD.        \n' +
    'remote: \n' +
    "remote: You can set the 'receive.denyCurrentBranch' configuration variable        \n" +
    "remote: to 'ignore' or 'warn' in the remote repository to allow pushing into        \n" +
    'remote: its current branch; however, this is not recommended unless you        \n' +
    'remote: arranged to update its work tree to match what you pushed in some        \n' +
    'remote: other way.        \n' +
    'remote: \n' +
    'remote: To squelch this message and still keep the default behaviour, set        \n' +
    "remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.        \n" +
    'To C:\\Repos\\semantic-release - Copy\n' +
    ' * [new tag]         v0.1.2 -> v0.1.2\n' +
    ' ! [remote rejected] HEAD -> main (branch is currently checked out)\n' +
    "error: failed to push some refs to 'C:\\Repos\\semantic-release - Copy'",
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false,
  pluginName: '@semantic-release/git'
}

@joshunrau
Copy link
Author

Have you tried with npx rather than pnpx?

I can confirm it also fails with npx:

https://github.com/joshunrau/semantic-release/actions/runs/8600045129/job/23564198200

@joshunrau
Copy link
Author

I can run it from end to end locally:

❯ HUSKY=0 pnpm exec semantic-release --ci=0
[8:40:08 AM] [semantic-release] › ℹ  Running semantic-release version 23.0.7
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[8:40:08 AM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[8:40:09 AM] [semantic-release] › ✔  Run automated release from branch main on repository https://github.com/joshunrau/semantic-release.git
[8:40:09 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[8:40:09 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[8:40:09 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[8:40:09 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
[8:40:09 AM] [semantic-release] [@semantic-release/npm] › ℹ  Verify authentication for registry https://registry.npmjs.org/
[8:40:09 AM] [semantic-release] [@semantic-release/npm] › ℹ  Reading npm config from /Users/joshua/.npmrc
joshunrau
[8:40:10 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
[8:40:10 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
[8:40:10 AM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication
[8:40:10 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/github"
[8:40:10 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
[8:40:10 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
[8:40:10 AM] [semantic-release] › ℹ  Found git tag v0.1.2 associated with version 0.1.2 on branch main
[8:40:10 AM] [semantic-release] › ℹ  Found 3 commits since last release
[8:40:10 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[8:40:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix: test release workflow
[8:40:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[8:40:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Merge branch 'main' of https://github.com/joshunrau/semantic-release
[8:40:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[8:40:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: ci: swap pnpm exec with npx
[8:40:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[8:40:10 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 3 commits complete: patch release
[8:40:10 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[8:40:10 AM] [semantic-release] › ℹ  The next release version is 0.1.3
[8:40:10 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[8:40:10 AM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[8:40:10 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[8:40:10 AM] [semantic-release] [@semantic-release/changelog] › ℹ  Update /Users/joshua/Developer/Personal/semantic-release/CHANGELOG.md
[8:40:10 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[8:40:10 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/npm"
[8:40:10 AM] [semantic-release] [@semantic-release/npm] › ℹ  Write version 0.1.3 to package.json in /Users/joshua/Developer/Personal/semantic-release
v0.1.3
[8:40:10 AM] [semantic-release] [@semantic-release/npm] › ℹ  Creating npm package version 0.1.3
npm notice 
npm notice 📦  @joshunrau/semantic-release@0.1.3
npm notice === Tarball Contents === 
npm notice 1.1kB LICENSE       
npm notice 1.8kB README.md     
npm notice 95B   bin/cli.js    
npm notice 1.8kB package.json  
npm notice 82B   src/index.d.ts
npm notice 786B  src/index.js  
npm notice === Tarball Details === 
npm notice name:          @joshunrau/semantic-release             
npm notice version:       0.1.3                                   
npm notice filename:      joshunrau-semantic-release-0.1.3.tgz    
npm notice package size:  2.6 kB                                  
npm notice unpacked size: 5.7 kB                                  
npm notice shasum:        46e251532fc2ec22b9d7e6300892e8e1429bb0fd
npm notice integrity:     sha512-nt/o453Fy+oHc[...]EZUuXllUci9Rw==
npm notice total files:   6                                       
npm notice 
joshunrau-semantic-release-0.1.3.tgz
[8:40:11 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/npm"
[8:40:11 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/git"
[8:40:11 AM] [semantic-release] [@semantic-release/git] › ℹ  Found 2 file(s) to commit
[8:40:12 AM] [semantic-release] [@semantic-release/git] › ℹ  Prepared Git release: v0.1.3
[8:40:12 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/git"
[8:40:12 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[8:40:12 AM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[8:40:13 AM] [semantic-release] › ✔  Created tag v0.1.3
[8:40:13 AM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/npm"
[8:40:13 AM] [semantic-release] [@semantic-release/npm] › ℹ  Publishing version 0.1.3 to npm registry on dist-tag latest
npm WARN publish npm auto-corrected some errors in your package.json when publishing.  Please run "npm pkg fix" to address these errors.
npm WARN publish errors corrected:
npm WARN publish "bin" was converted to an object
npm WARN publish "bin[@joshunrau/semantic-release]" was renamed to "bin[semantic-release]"
npm WARN publish "bin[semantic-release]" script name was cleaned
npm WARN publish "repository.url" was normalized to "git+https://github.com/joshunrau/semantic-release.git"
npm notice 
npm notice 📦  @joshunrau/semantic-release@0.1.3
npm notice === Tarball Contents === 
npm notice 1.1kB LICENSE       
npm notice 1.8kB README.md     
npm notice 95B   bin/cli.js    
npm notice 1.8kB package.json  
npm notice 82B   src/index.d.ts
npm notice 786B  src/index.js  
npm notice === Tarball Details === 
npm notice name:          @joshunrau/semantic-release             
npm notice version:       0.1.3                                   
npm notice filename:      joshunrau-semantic-release-0.1.3.tgz    
npm notice package size:  2.6 kB                                  
npm notice unpacked size: 5.7 kB                                  
npm notice shasum:        46e251532fc2ec22b9d7e6300892e8e1429bb0fd
npm notice integrity:     sha512-nt/o453Fy+oHc[...]EZUuXllUci9Rw==
npm notice total files:   6                                       
npm notice 
npm notice Publishing to https://registry.npmjs.org/ with tag latest and default access
+ @joshunrau/semantic-release@0.1.3
[8:40:16 AM] [semantic-release] [@semantic-release/npm] › ℹ  Published @joshunrau/semantic-release@0.1.3 to dist-tag @latest on https://registry.npmjs.org/
[8:40:16 AM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/npm"
[8:40:16 AM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/github"
[8:40:17 AM] [semantic-release] [@semantic-release/github] › ℹ  Published file https://github.com/joshunrau/semantic-release/releases/download/untagged-390d3e5a2f636575b0c4/joshunrau-semantic-release-0.1.3.tgz
[8:40:18 AM] [semantic-release] [@semantic-release/github] › ℹ  Published GitHub release: https://github.com/joshunrau/semantic-release/releases/tag/v0.1.3
[8:40:18 AM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/github"
[8:40:18 AM] [semantic-release] › ℹ  Start step "success" of plugin "@semantic-release/github"
[8:40:20 AM] [semantic-release] › ✔  Completed step "success" of plugin "@semantic-release/github"
[8:40:20 AM] [semantic-release] › ✔  Published release 0.1.3 on default channel

@travi
Copy link
Member

travi commented Apr 8, 2024

I can confirm it also fails with npx

could you remove the setup-pnpm step when using npx? i see nothing obvious in your setup that would cause this, so i'm taking guesses around details that i dont normally use in my own pipelines. there should be no need for pnpm to be involved in this release process, so i'm hoping removing that confirms whether it has any impact here

@travi
Copy link
Member

travi commented Apr 8, 2024

also worth considering (even though it doesnt get to the root of the problem)... why do you need to make a commit as part of your release? we normally recommend against committing during your release unless you really need to because of the extra complexity it adds. this isnt one of the complexities that we normally see, but it is worth noting that it isnt as important to disable husky if you dont make commits in your release pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants