Open uriklar opened 1 year ago
I started using it yesterday and have/had the same problem.
In conventionalcommits summary it said:
types other than fix: and feat: are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommends build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others.
Some of those types (e.g. ci:
) did not appear in my changelog. But after changing: z changelog-types
everything works fine.
Hi @uriklar, i get the same problem, if i don't miss, the pr_number output is populate only once you validate the PR. To catch the pr number before validate the PR, i used this :
echo ${{ toJSON(steps.release.outputs.pr) }} >> pr.json
echo "pr_number=$(jq -r '.number' pr.json)" >> $GITHUB_OUTPUT
Can confirm that the outputs are unset (even the ones that shouldn't be) when release-please doesn't do a release.
It would be much nicer for debugging actions if these outputs are always set to some value -- even if it's "none" or "". At least then they outputs will show in the debug logs, which makes it much easier to tell what's going on.
It would be nice if major/minor/patch values are available even if outputs.release_created
is false.
I'd like to create & publish a snapshot release with that value.
Can't see any reason why outputs.major
, outputs.minor
and outputs.patch
aren't set when the release is not created, if they're used for the PR title (so they're computed anyway).
@dsiguero would you like to send a patch that sets the outputs when a release is not created? My one concern is that perhaps people are using these outputs to decide whether the next step in the action should execute, we should make this a breaking change IMO.
A release pull request could contain several components that have different versions. It might be possible to expose more data in the output of the release PRs created.
It would be nice if major/minor/patch values are available even if
outputs.release_created
is false.I'd like to create & publish a snapshot release with that value.
I have a workaround for that. It is not pretty but it do work.
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.extract_version.outputs.version }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release-please
with:
release-type: <your_release_type>
token: <your_pat_token>
- name: Extract version
id: extract_version
run: |
VERSION=$(echo '${{ steps.release-please.outputs.pr }}' | jq -r '.title' | grep -oP '(?<=release )\d+\.\d+\.\d+')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Use Version
run: echo "The new version is ${{ steps.extract_version.outputs.version }}"
What's the status on this? It would be useful to have this feature, in my case, I would like to tag container images with these version values and then later deploy the selected version when the release PR is merged.
TL;DR
I'm trying to use the action outputs in a slack notification message but for some reason they are blank
Expected behavior
steps.release.outputs.pr
has the value of the created PRObserved behavior
Value is empty
Action YAML
Log output
Additional information
No response