Can't seem to make it work.. nextRelease is always empty
maranmaran opened this issue · comments
Hello, I'm having some trouble and I hope you can help me resolve it.
If we're following the configuration example for jobs and outputting of nextRelease it always comes out either empty or won't even pass the pipeline if we straight up use the code sample.
Perhaps I am missing something?
My powershell output variable task fails on $(nextRelease) and all echos don't show anything
Code used:
- job: Tag_Release
displayName: Tag release
pool:
vmImage: 'vs2017-win2016'
steps:
- script: >
npx
-p semantic-release
-p @semantic-release/git
-p semantic-release-ado
semantic-release
displayName: 'Tag release (semantic)'
env: { GH_TOKEN: $(GitHubToken) }
- script: echo $(nextRelease) <- tried various combination of outputting and no result
# Output version number to be available to other jobs
- powershell: |
echo "##vso[task.setvariable variable=versionNumber;isOutput=true]$(nextRelease)" <-- This fails. Tried $env:nextRelease
name: versionOutput
displayName: Release version output
My pipeline output is
[7:11:10 AM] [semantic-release] › ℹ Running semantic-release version 17.2.2
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/github"
[7:11:11 AM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/github"
[7:11:15 AM] [semantic-release] › ✔ Run automated release from branch main on repository https://[secure]@github.com/maranmaran/Pricely-protobuf-monorepo
[7:11:16 AM] [semantic-release] › ✔ Allowed to push to the Git repository
[7:11:16 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/npm"
[7:11:16 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
[7:11:16 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
[7:11:16 AM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication
[7:11:17 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
[7:11:17 AM] [semantic-release] › ℹ Found git tag v1.3.1 associated with version 1.3.1 on branch main
[7:11:17 AM] [semantic-release] › ℹ Found 2 commits since last release
[7:11:17 AM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[7:11:17 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: no message
[7:11:17 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[7:11:17 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: install
[7:11:17 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[7:11:17 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 2 commits complete: minor release
[7:11:17 AM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
I don't see semantic-release-ado being loaded as plugin :/
Fixed it with proper package.json config
"release": {
"branches": [ "main" ],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/changelog",
"@semantic-release/git",
"semantic-release-ado"
]
}
npx
-p semantic-release
-p @semantic-release/changelog
-p @semantic-release/git
-p semantic-release-ado
semantic-release