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

How to use the output? #40

Closed
Ismoh opened this issue Sep 24, 2022 · 1 comment
Closed

How to use the output? #40

Ismoh opened this issue Sep 24, 2022 · 1 comment

Comments

@Ismoh
Copy link

Ismoh commented Sep 24, 2022

I use the example workflow.yml and realised that the output is put somewhere, but I would like to use it to create a CHANGELOG.md.
CHANGELOG.md was created in Generated log placed in /github/workspace/CHANGELOG.md, but how can I access it?
Can someone give me a hint how to do so?

This is my changelog-generator.yml:
https://github.com/Ismoh/NoitaMP/blob/72-include-changelog-generator/.github/workflows/changelog-generator.yml
And the workflow run:
https://github.com/Ismoh/NoitaMP/actions/runs/3118913727/jobs/5058526684

In addition to this I thought the release body content would be updated with the generated changelog output.

Edit: Found the path here: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems

What am I doing wrong?

@Ismoh
Copy link
Author

Ismoh commented Sep 27, 2022

If there is anyone out there, having the same understanding issue in first glance, have a look on this:

- name: Generate CHANGELOG.md
  id: generate_changelog <---- Add an id to the step
  uses: heinrichreimer/[email protected]
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    dateFormat: "%d.%m.%Y"
    output: "CHANGELOG.md"
    issueLineLabels: "ALL"
    breakingLabels: "backwards-incompatible,breaking,rework,refactor"
    futureRelease: $NEXT_VERSION

- name: Commit and push CHANGELOG.md, when merged
  env:
    CHANGELOG: ${{ steps.generate_changelog.outputs.changelog }} <--- use the output as shown here. 'generate_changelog' is the id in the previews step.

Hope this might help someone!

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

1 participant