Open Sebastian-0 opened 5 months ago
I was trying out release please to manage releases inside the monorepo. I am facing the same issue. content of release-please-config.json
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false,
"exclude-paths": ["cache", "metrics"],
"include-v-in-tag": true,
"extra-labels": ["main"],
"release-type": "simple"
},
"cache": {
"release-type": "go",
"include-v-in-tag": true,
"include-component-in-tag": true,
"extra-labels": ["cache"],
"tag-separator": "@"
},
"metrics": {
"release-type": "go",
"include-v-in-tag": true,
"include-component-in-tag": true,
"extra-labels": ["metrics"]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
github action workflow content
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
include-component-in-tag: true
It turned out the issue in my case was that release-type: simple
does not have component names defined for your manifest's packages, it only has a version (in version.txt
). In my case I wanted to use node
as the release type anyway, and when I added a package.json
with a name
property for each package it started working. I also stopped using the global package .
and instead moved everything into sub-folders (no idea if this helped fix the issue since I did this before the other change).
This behaviour is not documented. I'm not sure if you're facing a similar issue @coderkakarrot , maybe your packages are lacking a name property?
@Sebastian-0 Can you share your folder structure and final configuration final to check? I have the same issue using go in monorepo but I cannot resolve it yet. 🙏
what do i have to do exaclly? did clicking on the release-please do it fully in all aspects? i also ran $~ npm -i release-please -g said 200 packages downloaded and 30 are looking to be funded.. on my mac osx . the pred linux that is built ubuntu is compleately screwed up its got a min of its own we go threw it lol. hense my confustion it seems to have malware of somekind..how do i go about this ? i hope someone has some insights or guidence on whats next
also are you talking to me regardjng the name? im wanting to release please ..i just wsnt want security complience and control above all so i can get to working on building something that will benifit . i want to learn and contribute moving foward aslong as i can understand fully all consepts and implmentations in project/s casue i'am alittle lost.in some areas,atleast most the basic concepts that is vital to fulldisclourse and thrive in this feild so i could really benifit from being able to discuss things with someone here that knows alot if not the one who wrote most of the code . is there another chat sonewhere i can be guided to and get ahold of that person? sovwhat exacky are you trying to do? sorry i havent fully made a secret in actions yet as i had to find out how to configure that an i had a few rl events also i have to take care of. sadily untill i can pay bills from this feild ill always be in and out unfortunately.. if youre wsnting in me to get a action done..i think. idk how to tell if a post or issue pr is to me. other then breadcrubsb. thank you for your help in this matter. sorry if im not following a guideline as how specificy to comment on this thread, but im just learning to the "force" ill be jedi warrior one day lol. @Sebastian-0 @shoootyou @coderkakarrot @chingor13 @LucaLanziani
so am i needeing to config that json? and the secerts key like you stated above ? so just i make a pr first right whst would it be just "release pr"
@Sebastian-0 I am using monorepo for golang packages. I have removed configuration for the root folder from the release-please-config.json
and .release-please-manifest.json
.
@shoootyou You can refer to configuration that I am using see if this helps.
release-please-config.json
{
"include-component-in-tag": true,
"separate-pull-requests": true,
"release-type": "go",
"packages": {
"cache": {
"component": "cache",
"release-type": "go",
"include-v-in-tag": true,
"include-component-in-tag": true,
"extra-labels": ["cache"],
"tag-separator": "@"
},
"metrics": {
"component": "metrics",
"release-type": "go",
"include-v-in-tag": true,
"include-component-in-tag": true,
"extra-labels": ["metrics"],
"tag-separator": "@"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
.release-please-manifest.json
{
"cache": "0.0.4",
"metrics": "0.0.3"
}
release-please.yml
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
include-component-in-tag: true
@shoootyou The component name is resolved in the following order:
component
property in release-please-config.json
package-name
property in release-please-config.json
release-type
simple
: empty stringnode
: name
property in package.json
go
: empty stringSo all you have to do if you're using golang is to set either the property component
or package-name
for the package, similar to what @coderkakarrot suggested above.
The component
property is completely undocumented (doesn't even exist in the json schema), and so are the fallback component names for each release type. I figured it out after digging through the source code 😄
Love how you ignored my comment line in not even here don’t help my right
Also getting this issue with regards to terraform. It seems like I have to put the component
in the packages for this to work.
TL;DR
Setting the option
include-component-in-tag: true
has no effect, no matter whether you set it in the workflow file or the manifest file.Expected behavior
When setting the option
include-component-in-tag: true
the tags should be generated with a component name, likecomp_v1.0
.Observed behavior
No matter where I set the option I still only get tags like
v1.0
, no component name is prepended. I'm not 100% sure where the component name is supposed to come from actually since there is no setting to define one, so maybe I'm missing some detail to get this working.Action YAML
Log output
Additional information
Manifest file
release-please-config.json
, here I also addedinclude-component-in-tag: true
but to no effect: