{"id":14986010,"url":"https://github.com/roang-zero1/github-create-release-action","last_synced_at":"2025-04-10T16:42:55.649Z","repository":{"id":40894417,"uuid":"192059841","full_name":"Roang-zero1/github-create-release-action","owner":"Roang-zero1","description":"Create a GitHub release from a Tag","archived":false,"fork":false,"pushed_at":"2024-05-24T11:49:24.000Z","size":53,"stargazers_count":42,"open_issues_count":4,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T23:20:42.226Z","etag":null,"topics":["actions","ci","continuous-integration","release-automation"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/Roang-zero1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2019-06-15T09:19:34.000Z","updated_at":"2024-02-02T13:18:04.000Z","dependencies_parsed_at":"2024-06-18T17:00:30.289Z","dependency_job_id":"319add84-137e-4dea-b449-2e0a9f262b04","html_url":"https://github.com/Roang-zero1/github-create-release-action","commit_stats":{"total_commits":101,"total_committers":8,"mean_commits":12.625,"dds":"0.15841584158415845","last_synced_commit":"57eb9bdce7a964e48788b9e78b5ac766cb684803"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roang-zero1%2Fgithub-create-release-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roang-zero1%2Fgithub-create-release-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roang-zero1%2Fgithub-create-release-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roang-zero1%2Fgithub-create-release-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Roang-zero1","download_url":"https://codeload.github.com/Roang-zero1/github-create-release-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252728,"owners_count":21072703,"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","ci","continuous-integration","release-automation"],"created_at":"2024-09-24T14:12:07.872Z","updated_at":"2025-04-10T16:42:55.621Z","avatar_url":"https://github.com/Roang-zero1.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action for Creating a Release on Tag push\n\nCreates a new GitHub release whenever a tag is pushed.\n\n## Example Usage\n\nThe following basic workflow will create a release whenever any tag is pushed that matches the version_regex.\n\n```yaml\nname: Release\n\non:\n  push:\n    tags:\n      - \"v[0-9]+.[0-9]+.[0-9]+\"\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Create GitHub release\n        uses: Roang-zero1/github-create-release-action@v3\n        with:\n          version_regex: ^v[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Limiting versions and creating pre-releases\n\nIf only certain tags should create releases or some releases should be created as pre-release you can set regular expression to achieve this.\nThese regular expression are evaluated with GNU grep, so these regular expressions need to be compatible with it.\nRegular expressions containing `\\` need them to be escaped with `\\\\`.\n\n- `version_regex` Regular expression to verify that the version is in a correct format. Defaults to `.*` (accept everything).\n- `prerelease_regex` Any version matching this regular expression will be marked as pre-release. Disabled by default.\n\n```yaml\n- name: Create GitHub release\n  uses: Roang-zero1/github-create-release-action@v3\n  with:\n    version_regex: ^v[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+\n    prerelease_regex: \"^v2\\\\.[[:digit:]]+\\\\.[[:digit:]]+\"\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Passing a tag to not rely on manual tag pushes\n\nIf you want to create a tag automatically and create the release in the same workflow you can set `created_tag` to achieve this.\nThis allows you to create a fully automated release in one workflow file (workaround because one workflow/action can not trigger another workflow/action).  \nThe example below uses `K-Phoen/semver-release-action` to create the tag whenever a pull request is closed, merged, and the head_ref starts with RC.\nAfter the tag is created it is passed to the create-release-action via the CREATED_TAG env variable using the output of the `semver-release-action`.\n\n```yaml\non:\n  pull_request:\n    types: closed\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    if: github.event.pull_request.merged \u0026\u0026 startsWith(github.head_ref, 'RC')\n    steps:\n      - uses: actions/checkout@v3\n      - name: Tag and prepare release\n        id: tag_and_prepare_release\n        uses: K-Phoen/semver-release-action@v1.3.1\n        with:\n          release_branch: master\n          release_strategy: tag\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - name: Upload release notes\n        if: steps.tag_and_prepare_release.outputs.tag\n        uses: Roang-zero1/github-create-release-action@v3\n        with:\n          created_tag: ${{ steps.tag_and_prepare_release.outputs.tag }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Using the tag message as release body\n\nIf you have tag messages that you want to use as a release body you can pass them from the workflow with the `release_text` parameter.\n\n```yaml\n- uses: actions/checkout@v3\n- name: \"Refresh tags\"\n  id: tag\n  run: git fetch --tags --force # Is currently required for v3 due to https://github.com/actions/checkout/issues/290\n- uses: ericcornelissen/git-tag-annotation-action@v3\n  id: tag-data\n- name: Create GitHub release\n  uses: Roang-zero1/github-create-release-action@v3\n  with:\n    version_regex: ^v[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+\n    release_text: ${{ steps.tag-data.outputs.git-tag-annotation }}\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Change log parsing\n\nThis action makes it possible to extract the release description from a Markdown change log.\n\nBy default, the `CHANGELOG.md` file is searched for a `##` (h2) heading matching the tag text.\n\nIf it is found the section is passed as body to the release API.\n\nIf for example we release the tag `v1.0.0` with a `CHANGELOG.md` as follows:\n\n```Markdown\n# Changelog\n\n## v1.0.0\n\nInitial Release\n```\n\nThen the text `Initial Release` will be passed as body.\nMarkdown restrictions for release bodies still apply.\n\n_Parsed change logs with will have the new lines (/r, /n) and percent symbols (%) escaped._\n\n## Inputs\n\n### `version_regex`\n\nRegular expression to verify that the version is in a correct format. Defaults to `.*` (accept everything).\n\n### `prerelease_regex`\n\nAny version matching this regular expression will be marked as pre-release. Disabled by default.\n\n### `create_draft`\n\nCreate the releases as draft (`true|false [default: false]`). Existing will not be updated from released to draft.\n\n### `update_existing`\n\nControls whether an existing release should be updated with data from the latest push (`true|false [default: false]`).\n\n### `created_tag`\n\nAllows to pass an already created tag.\n\n### `release_title`\n\nAllows to pass a release title.\n\n### `changelog_file`\n\nFile that contains the Markdown formatted change log. Defaults to `CHANGELOG.md`.\n\n### `changelog_heading`\n\nHeading level at which the tag headings exist. Defaults to `h2`, this parses headings at the markdown level `##`.\n\n## Outputs\n\n### `id`\n\nID number of the created or updated release.\n\n### `html_url`\n\nHTML access URL for the created or updated release.\n\n### `upload_url`\n\nArtifact upload URL for the created or updated release.\n\n### `changelog`\n\nText of the parsed change log entry.\n\n## Secrets\n\n- `GITHUB_TOKEN` Provided by GitHub action, does not need to be set.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froang-zero1%2Fgithub-create-release-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froang-zero1%2Fgithub-create-release-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froang-zero1%2Fgithub-create-release-action/lists"}