{"id":15716659,"url":"https://github.com/gableroux/generate-github-release-notes","last_synced_at":"2025-04-13T19:33:40.860Z","repository":{"id":211637065,"uuid":"729629568","full_name":"GabLeRoux/generate-github-release-notes","owner":"GabLeRoux","description":"Github action replicating the functionality of the \"Generate Release Notes\" button","archived":false,"fork":false,"pushed_at":"2025-01-02T16:13:30.000Z","size":573,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T10:12:44.386Z","etag":null,"topics":["github-actions","github-api","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabLeRoux.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-09T20:45:06.000Z","updated_at":"2025-01-02T16:13:32.000Z","dependencies_parsed_at":"2024-10-24T13:12:49.939Z","dependency_job_id":"439c894a-4e45-4691-afa7-6563bffe6ea2","html_url":"https://github.com/GabLeRoux/generate-github-release-notes","commit_stats":null,"previous_names":["gableroux/generate-github-release-notes"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fgenerate-github-release-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fgenerate-github-release-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fgenerate-github-release-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fgenerate-github-release-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabLeRoux","download_url":"https://codeload.github.com/GabLeRoux/generate-github-release-notes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248768231,"owners_count":21158604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","github-api","typescript"],"created_at":"2024-10-03T21:46:26.642Z","updated_at":"2025-04-13T19:33:40.833Z","avatar_url":"https://github.com/GabLeRoux.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generate GitHub Release Notes Action\n\n[![Run Tests](https://github.com/GabLeRoux/generate-github-release-notes/actions/workflows/main.yml/badge.svg)](https://github.com/GabLeRoux/generate-github-release-notes/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/GabLeRoux/generate-github-release-notes/graph/badge.svg?token=wl8zngEHpC)](https://codecov.io/gh/GabLeRoux/generate-github-release-notes)\n\nThis GitHub Action generates structured release notes by fetching and formatting merged pull requests between specified\ntags. It mirrors the functionality of GitHub's \"Generate Release Notes\" feature available on the release creation page.\n\n## ⚠ Important note\n\n_This project was a personal challenge to practice GitHub Actions development._\n\n**Instead of using this action, you should\nuse [softprops/action-gh-release@v2](https://github.com/softprops/action-gh-release) which is more mature and already\nhas a release notes feature.**\n\n\u003e | Name                     | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n\u003e |--------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\u003e | `generate_release_notes` | Boolean | Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes. See the [GitHub docs for this feature](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) for more information |\n\nComplete example usage of the suggested alternative:\n\n```yaml\nname: Create Release\n\non:\n  push:\n    tags:\n      - 'v*'\n\njobs:\n  prepareArtifact:\n    name: Prepare Artifact\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n      - name: Create Dummy File\n        run: |\n          mkdir -p build/StandaloneWindows64\n          echo \"Dummy content\" \u003e build/StandaloneWindows64/build-StandaloneWindows64\n      - name: Upload Artifact\n        uses: actions/upload-artifact@v4\n        with:\n          name: build-StandaloneWindows64\n          path: build/StandaloneWindows64/build-StandaloneWindows64\n\n  release:\n    name: Create and Publish Release\n    needs: prepareArtifact\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      - name: Download Artifact\n        uses: actions/download-artifact@v4\n        with:\n          name: build-StandaloneWindows64\n          path: build/StandaloneWindows64\n\n      - name: Publish Release and Upload Artifact\n        uses: softprops/action-gh-release@v2\n        with:\n          files: build/StandaloneWindows64/build-StandaloneWindows64\n          # this configuration here should give you the same result as the generate-github-release-notes action\n          generate_release_notes: true\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## The \"Generate Release Notes\" button\n\nBefore clicking the \"Generate Release Notes\" button, the release notes section is empty:\n\n![generate-release-notes-button.png](./docs/generate-release-notes-button.png)\n\nAfter clicking the \"Generate Release Notes\" button, the release notes section is populated with the generated release\nnotes:\n\n![generate-release-notes-button-clicked.png](./docs/generate-release-notes-button-clicked.png)\n\nNice! Now, let's see how to do the same thing with GitHub Actions.\n\n## Features\n\n- **Automated Release Notes Generation:** Creates release notes based on merged PRs between tags.\n- **New Contributors Detection:** Optionally identifies first-time contributors to your project.\n- **Customizable Tag Comparison:** Specify base and head tags for comparison.\n- **GitHub Token Support:** Utilizes GitHub token for repository access.\n\n## Configuration\n\nTo use this action in your workflow, add the following step:\n\n```yaml\n- name: Generate Release Notes\n  uses: gableroux/generate-github-release-notes@v0.1.2\n  with:\n    repository: ${{ github.repository }}\n    base_tag: ${{ github.event.release.tag_name }}\n    head_tag: ${{ github.sha }}\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    # auto_detect_new_contributors: 'true' # Optional, set to 'true' to detect new contributors, this is still experimental.\n```\n\n## Usage\n\n1. **Include the Action:** Incorporate the action in your GitHub workflow.\n2. **Set Tags:** Define `base_tag` and `head_tag` to specify the tag range.\n3. **GitHub Token:** Provide a GitHub token for repository access. This is provided by default by GitHub actions.\n4. **Run the Workflow:** Trigger the workflow to generate release notes.\n\n## Output example\n\n```markdown\n## What's Changed\n\n* Enhancements: Features, Customization, and Contributor Detection by @GabLeRoux\n  in https://github.com/GabLeRoux/generate-github-release-notes/pull/4\n* npm run build by @GabLeRoux in https://github.com/GabLeRoux/generate-github-release-notes/pull/5\n\n**Full Changelog**: https://github.com/GabLeRoux/generate-github-release-notes/compare/v0.0.2...v0.0.3\n```\n\n### Rendered output example\n\n---\n\n## What's Changed\n\n* Enhancements: Features, Customization, and Contributor Detection by @GabLeRoux\n  in https://github.com/GabLeRoux/generate-github-release-notes/pull/4\n* npm run build by @GabLeRoux in https://github.com/GabLeRoux/generate-github-release-notes/pull/5\n\n**Full Changelog**: https://github.com/GabLeRoux/generate-github-release-notes/compare/v0.0.2...v0.0.3\n\n---\n\nTo update the \"Good Practice\" section of your `README.md` based on your usage example, I'll provide a revised version\nthat aligns with the working example you provided. Here's the updated section:\n\n---\n\n## Alternative Usage example\n\nAs mentioned earlier, the suggested alternative is to\nuse [softprops/action-gh-release@v2](https://github.com/softprops/action-gh-release). If you're still here, then you\nprobably want to customize the release notes generation. Here's how you can combine both actions to achieve this:\n\n```yaml\nname: Release\n\non:\n  push:\n    tags:\n      - 'v*'\n\njobs:\n  prepareArtifact:\n    name: Prepare Artifact\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n      # Additional steps to build or prepare your project...\n\n  release:\n    name: Create and Publish Release\n    needs: prepareArtifact\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      # Using gableroux/generate-github-release-notes here to generate release notes\n      - name: Generate Release Notes\n        id: release_notes\n        uses: gableroux/generate-github-release-notes@v0.1.2\n        with:\n          repository: ${{ github.repository }}\n          base_tag: ${{ github.event.release.tag_name }}\n          head_tag: ${{ github.sha }}\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Create Release\n        uses: softprops/action-gh-release@v2\n        with:\n          # this is the description of the release from previous step\n          body: ${{ steps.release_notes.outputs.notes }}\n          tag_name: ${{ github.event.release.tag_name }}\n          draft: false\n          prerelease: false\n          # you should actually consider using this instead of gableroux/generate-github-release-notes\n          # generate_release_notes: true\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nIn this example, the `gableroux/generate-github-release-notes` action is used to generate release notes based on merged\nPRs between tags. The `softprops/action-gh-release` action is then used to create a GitHub Release, incorporating the\ngenerated release notes in the release description.\n\n## Contributing\n\nContributions are welcome! Feel free to fork the repo, create a feature branch, commit your changes, and open a pull\nrequest.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md). © [Gabriel Le Breton](https://gableroux.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgableroux%2Fgenerate-github-release-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgableroux%2Fgenerate-github-release-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgableroux%2Fgenerate-github-release-notes/lists"}