{"id":16389004,"url":"https://github.com/lucacome/draft-release","last_synced_at":"2025-08-20T03:44:47.721Z","repository":{"id":154429221,"uuid":"578721235","full_name":"lucacome/draft-release","owner":"lucacome","description":"Draft the next GitHub release","archived":false,"fork":false,"pushed_at":"2025-03-12T21:40:02.000Z","size":9761,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-13T16:01:51.006Z","etag":null,"topics":["actions","release","release-automation","release-notes"],"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/lucacome.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-15T18:16:02.000Z","updated_at":"2025-03-12T21:40:05.000Z","dependencies_parsed_at":"2024-02-16T19:24:50.477Z","dependency_job_id":"4a5f13bf-6dcd-4df7-8edd-b6c4cabf3159","html_url":"https://github.com/lucacome/draft-release","commit_stats":{"total_commits":211,"total_committers":5,"mean_commits":42.2,"dds":"0.47393364928909953","last_synced_commit":"e63c5c7fb3a14f3782e968cf408855000bc4dcd7"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacome%2Fdraft-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacome%2Fdraft-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacome%2Fdraft-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacome%2Fdraft-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucacome","download_url":"https://codeload.github.com/lucacome/draft-release/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245056889,"owners_count":20553855,"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":["actions","release","release-automation","release-notes"],"created_at":"2024-10-11T04:30:43.982Z","updated_at":"2025-08-20T03:44:47.699Z","avatar_url":"https://github.com/lucacome.png","language":"TypeScript","readme":"# Draft Release Action\n\nThis action creates a draft release for the next version to be released. It reads the release file in `.github/release.yml` and creates a draft release with the next version number based on the current version number and the labels of the pull requests merged since the last release.\n\nTo use this action, you need to create a release file in `.github/release.yml` as shown in the GitHub documentation for [creating a release file](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes).\n\n\u003e [!NOTE]\n\u003e\n\u003e This action requires read and write access to the repository's releases, this usually means `contents: write` permissions for the job running the action.\n\u003e\n\u003e You might need to change the permissions granted to the GITHUB_TOKEN or use a personal token with the appropriate permissions.\n\nTo decide whether the next release should be a major or minor release, the action looks at the labels of the pull requests merged since the last release. If there is at least one pull request with the label specified in the `major-label` input, the next release will be a major release. Otherwise, if there is at least one pull request with the label specified in the `minor-label` input, the next release will be a minor release. Otherwise, the next release will be a patch release.\n\nWhen the action is triggered on a tag push, the action will create a release with the version number specified in the tag.\n\n## Simple Usage\n\n```yaml\nname: Draft Release\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  draft-release:\n    runs-on: ubuntu-22.04\n    steps:\n      - uses: actions/checkout@v3\n      - uses: lucacome/draft-release@v1.2.4\n        with:\n          minor-label: 'enhancement'\n          major-label: 'change'\n```\n\n## Inputs\n\n| Name                          | Type      | Description                                                       |\n|-------------------------------|-----------|-------------------------------------------------------------------|\n| `github-token`                | `string`  | The GitHub token to use for the release. (default `github.token`) |\n| `minor-label`                 | `string`  | The label to use for minor releases. (default `enhancement`)      |\n| `major-label`                 | `string`  | The label to use for major releases. (default `change`)           |\n| `notes-header`                | `string`  | The header to use for the release notes.                          |\n| `notes-footer`                | `string`  | The footer to use for the release notes.                          |\n| `variables`                   | `list`    | A list of variables to use in the header and footer.              |\n| `publish`                     | `boolean` | Whether to publish the release. (default `false`)                 |\n| `collapse-after`              | `number`  | The number of PRs to show before collapsing. (default `0`)        |\n| `group-dependencies`          | `boolean` | Whether to group dependency updates. (default `true`)             |\n| `config-path`                 | `string`  | Path to release config file. (default `.github/release.yml`)      |\n| `dry-run`                     | `boolean` | Run without creating a release. (default `false`)                 |\n| `remove-conventional-prefixes`| `boolean` | Remove conventional prefixes from PR titles. (default `false`)    |\n\n## Outputs\n\n| Name               | Type     | Description                                                                          |\n| ------------------ | -------- | ------------------------------------------------------------------------------------ |\n| `version`          | `string` | The version number of the next release.                                              |\n| `previous-version` | `string` | The version number of the previous release.                                          |\n| `release-id`       | `string` | The ID of the next release.                                                          |\n| `release-notes`    | `string` | The release notes of the next release.                                               |\n| `release-url`      | `string` | The URL of the next release.                                                         |\n| `release-sections` | `string` | A JSON output containing the release sections and the pull requests in each section. |\n| `release-header`   | `string` | The header of the release notes.                                                     |\n| `release-footer`   | `string` | The footer of the release notes.                                                     |\n\n## Header and Footer\n\nThe header and footer have four special placeholders that will be replaced with the version number of the next release:\n\n- `{{version}}` will be replaced with the version number of the next release.\n- `{{version-number}}` will be replaced with the version number of the next release without the `v` prefix.\n- `{{previous-version}}` will be replaced with the version number of the previous release.\n- `{{previous-version-number}}` will be replaced with the version number of the previous release without the `v` prefix.\n\nAdditionally, you can use the `variables` input to define additional variables that can be used in the header and footer. These variables should be provided as a list of key-value pairs, using the format key=variable, with each pair separated by a new line. The key represents the variable name, while the value corresponds to the variable's assigned value. The variables can be used in the header and footer by using the syntax `{{variable-name}}`.\n\n## Examples\n\n### Add Footer\n\n```yaml\nname: Draft Release\n\non:\n  push:\n    branches:\n      - main\n    tags:\n      - 'v[0-9]+.[0-9]+.[0-9]+'\n\npermissions:\n  contents: read\n\njobs:\n  draft-release:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    steps:\n      - uses: actions/checkout@v3\n      - uses: lucacome/draft-release@v1.2.4\n        with:\n          minor-label: 'enhancement'\n          major-label: 'change'\n          variables: |\n            my-variable=My Variable\n          notes-footer: |\n            This is a footer.\n            It can be multiline.\n            And can use variables like {{version}} and {{version-number}}.\n            Or custom variables like {{my-variable}}.\n```\n\n### Get Version Number of Next Release\n\n```yaml\nname: Draft Release\n\non:\n  push:\n    branches:\n      - main\n\npermissions:\n  contents: read\n\njobs:\n  draft-release:\n    runs-on: ubuntu-22.04\n    permissions:\n      contents: write\n    steps:\n      - uses: actions/checkout@v3\n      - uses: lucacome/draft-release@v1.2.4\n        id: draft-release\n        with:\n          minor-label: 'enhancement'\n          major-label: 'change'\n\n      - name: Get Version Number\n        run: echo ${{ steps.draft-release.outputs.version }}\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacome%2Fdraft-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacome%2Fdraft-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacome%2Fdraft-release/lists"}