{"id":43022761,"url":"https://github.com/datalad/release-action","last_synced_at":"2026-01-31T06:38:29.577Z","repository":{"id":61183363,"uuid":"536290912","full_name":"datalad/release-action","owner":"datalad","description":"GitHub action to prepare releases for DataLad and its extensions","archived":false,"fork":false,"pushed_at":"2025-09-08T17:21:25.000Z","size":73,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-11T10:49:54.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datalad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-13T20:03:51.000Z","updated_at":"2022-10-10T16:00:28.000Z","dependencies_parsed_at":"2023-11-17T23:01:31.894Z","dependency_job_id":"866b14a8-952c-4a11-b78b-538605ad9cd2","html_url":"https://github.com/datalad/release-action","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/datalad/release-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Frelease-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Frelease-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Frelease-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Frelease-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datalad","download_url":"https://codeload.github.com/datalad/release-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Frelease-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28931386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-31T06:38:29.043Z","updated_at":"2026-01-31T06:38:29.570Z","avatar_url":"https://github.com/datalad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository provides two custom GitHub Actions for working with changelogs\n\u0026 releases in the flow used by [DataLad](https://github.com/datalad/datalad)\nand related projects.\n\nBoth actions operate on a repository that must already be using\n[scriv](https://github.com/nedbat/scriv) to manage changelog entries.  In\naddition, the repository must contain a YAML configuration file (named\n\"`.datalad-release-action.yaml`\" by default) for use by the actions containing\nthe following keys:\n\n- `fragment-directory` — the path to scriv's fragment directory relative to the\n  root of the repository (which must also be the directory in which the action\n  is invoked); defaults to `changelog.d`\n\n- `tag-prefix` — string to prepend to the names of created tags and which all\n  previous versioned tags in the repository must begin with; defaults to the\n  empty string\n\n- `categories` — *(required)* a list of mappings describing the changelog\n  categories used by the project; the mapping keys are:\n    - `name` — *(required)* the category name as it will appear in changelog\n      headers; this must match a corresponding category name in `scriv.ini`\n      exactly\n    - `label` — a GitHub label; any pull requests with this label will be\n      placed under the given category by the `add-changelog-snippet` action.\n      If a pull request has multiple category labels, the first matching\n      category listed in the config file is used.\n    - `label-color` — the color for the GitHub label, as a six-digit\n      hexadecimal string (case insensitive) without a leading '#'; this color\n      will be used when the label is added or updated via the \"labels\" command\n    - `label-description` — the description for the GitHub label; this\n      description will be used when the label is added or updated via the\n      \"labels\" command\n    - `bump` — the version bump level to use when a PR with the associated\n      label is included in a release; can be `major`, `minor`, or `patch`\n      (default)\n\n- `extra-labels` — a list of mappings describing additional labels for the\n  \"labels\" command to create or update; the mapping keys are:\n    - `name` *(required)*\n    - `color` — a six-digit hexadecimal string (case insensitive) without a\n      leading '#'\n    - `description`\n\nAn example configuration file:\n\n```yaml\nfragment-directory: changelog.d\n\ntag-prefix: v\n\ncategories:\n  - name: 💥 Breaking Changes\n    bump: major\n    label: major\n    label-color: C5000B\n    label-description: Increment the major version when merged\n  - name: 🚀 Enhancements and New Features\n    bump: minor\n    label: minor\n    label-color: F1A60E\n    label-description: Increment the minor version when merged\n  - name: 🐛 Bug Fixes\n    label: patch\n    label-color: \"870048\"\n    label-description: Increment the patch version when merged\n  - name: 🔩 Dependencies\n    label: dependencies\n    label-color: 8732bc\n    label-description: Update one or more dependencies' versions\n  - name: 📝 Documentation\n    label: documentation\n    label-color: cfd3d7\n    label-description: Changes only affect the documentation\n  - name: 🏠 Internal\n    label: internal\n    label-color: \"696969\"\n    label-description: Changes only affect the internal API\n  - name: 🏎 Performance\n    label: performance\n    label-color: f4b2d8\n    label-description: Improve performance of an existing feature\n  - name: 🧪 Tests\n    label: tests\n    label-color: ffd3cc\n    label-description: Add or improve existing tests\n\nextra-labels:\n  - name: release\n    color: 007f70\n    description: Create a release when this pr is merged\n  - name: CHANGELOG-missing\n    color: 5B0406\n    description: When a PR does not contain add a changelog item, yet\n```\n\n\n# Action: `add-changelog-snippet`\n\nThis action creates a `pr-PRNUM.md` file in the fragment directory for a pull\nrequest.  The pull request must be labelled with at least one changelog\ncategory label.\n\nIf the PR already adds a file at the expected path, nothing is done.\nOtherwise, if the PR adds to the fragment directory exactly one file with a\nname of the form `*[-_]*.md`, that file is renamed to `pr-PRNUM.md`; if there\nare multiple such files, an error occurs.\n\n## Usage\n\n```yaml\n- name: Add changelog snippet\n  uses: datalad/release-action/add-changelog-snippet@v1\n  with:\n    # See \"Inputs\" below\n```\n\nThe action will operate on the pull request identified by `${{\ngithub.event.pull_request.number }}`.\n\n## Inputs\n\n| Key | Meaning | Default |\n| --- | ------- | ------- |\n| `config` | Path to the action configuration file | `.datalad-release-action.yaml` |\n| `git-author-email` | E-mail address to use when committing the changelog snippet | `bot@datalad.org` |\n| `git-author-name` | Name to use when committing the changelog snippet | `DataLad Bot` |\n| `rm-labels` | Names of labels (on separate lines) to remove from the pull request after generating the fragment | [empty] |\n| `token` | GitHub token to use for querying the GitHub API; just using `${{ secrets.GITHUB_TOKEN }}` is recommended | *(required)* |\n\n## Sample Workflow Usage\n\n```yaml\nname: Add changelog.d snippet\n\non:\n  # This action should be run in workflows triggered by `pull_request_target`\n  # (not by regular `pull_request`!)\n  pull_request_target:\n    # Run whenever the PR is pushed to, receives a label, or is created with\n    # one or more labels:\n    types: [synchronize, labeled]\n\n# Prevent the workflow from running multiple jobs at once when a PR is created\n# with multiple labels:\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.pull_request.head.label }}\n  cancel-in-progress: true\n\njobs:\n  add:\n    runs-on: ubuntu-latest\n    # Only run on PRs that have the \"CHANGELOG-missing\" label:\n    if: contains(github.event.pull_request.labels.*.name, 'CHANGELOG-missing')\n    steps:\n      - name: Check out repository\n        uses: actions/checkout@v4\n        with:\n          ref: ${{ github.event.pull_request.head.ref }}\n          repository: ${{ github.event.pull_request.head.repo.full_name }}\n\n      - name: Add changelog snippet\n        uses: datalad/release-action/add-changelog-snippet@v1\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          rm-labels: CHANGELOG-missing\n```\n\n\n# Action: `release`\n\nThis action prepares a release by performing the following:\n\n- All pull requests that have files in the fragments directory with names of\n  the form `pr-PRNUM.md` or `pr-PRNUM.rst` are inspected in order to determine\n  the maximum version bump level.\n\n- The highest-versioned tag that is of the form `N.N.N` after stripping\n  `tag-prefix` (It is an error if there is no such tag or if there have been no\n  commits to the repository's default branch since the highest tag) is used as\n  the previous release version, and it is bumped by the version bump level to\n  obtain the version for the new release.\n\n- A comment is made on all pull requests from step 1 and on the issues that\n  they close mentioning the new release.\n\n- `scriv collect` is run to create a new changelog section, and the results are\n  committed.\n\n- If the `pre-tag` input is not empty, it is executed as a series of Bash\n  commands.  These commands will have access to the following environment\n  variables:\n\n    - `GITHUB_TOKEN` — same as the `token` input\n    - `GIT_AUTHOR_NAME` — same as the `git-author-name` input\n    - `GIT_AUTHOR_EMAIL` — same as the `git-author-email` input\n    - `GIT_COMMITTER_NAME` — same as the `git-author-name` input\n    - `GIT_COMMITTER_EMAIL` — same as the `git-author-email` input\n    - `new_version` — the version of the new release (without leading prefix)\n    - `new_tag` — the tag of the new release (i.e., `tag-prefix` plus\n      `new_version`)\n\n- The repository HEAD is tagged with an annotated tag named with the version of\n  the new release prefixed with `tag-prefix`, the tag is pushed to GitHub, and\n  `scriv github-release` is run.\n\n- If the `pypi-token` input is not empty, then `python -m build` is run,\n  followed by `twine upload dist/*`\n\n## Usage\n\n```yaml\n- name: Add changelog snippet\n  uses: datalad/release-action/release@v1\n  with:\n    # See \"Inputs\" below\n```\n\n## Inputs\n\n| Key | Meaning | Default |\n| --- | ------- | ------- |\n| `config` | Path to the action configuration file | `.datalad-release-action.yaml` |\n| `git-author-email` | E-mail address to use when committing | `bot@datalad.org` |\n| `git-author-name` | Name to use when committing | `DataLad Bot` |\n| `pre-tag` | A series of Bash commands to run after updating the changelog and before tagging | [empty] |\n| `pypi-token` | A token for uploading a project to PyPI; supplying this will cause the project to be built \u0026 uploaded as a Python project to PyPI | [empty] |\n| `token` | GitHub token to use for interacting with the GitHub API; just using `${{ secrets.GITHUB_TOKEN }}` is recommended | *(required)* |\n\n## Output\n\n| Key           | Meaning |\n| ------------- | ------- |\n| `new-tag`     | The tag of the new release (includes prefix) |\n| `new-version` | The version of the new release (without leading prefix) |\n\n## Sample Workflow Usage\n\n```yaml\nname: Auto-release on PR merge\n\non:\n  # This action should be run in workflows triggered by `pull_request_target`\n  # (not by regular `pull_request`!)\n  pull_request_target:\n    branches:\n      # Create a release whenever a PR is merged into one of these branches:\n      - master\n      - maint\n    types:\n      - closed\n  # Allow manually triggering a release via a \"Run workflow\" button on the\n  # workflow's page:\n  workflow_dispatch:\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    # Only run for manual runs or merged PRs with the \"release\" label:\n    if: \u003e\n      github.event_name == 'workflow_dispatch'\n         || (github.event.pull_request.merged == true \u0026\u0026 contains(github.event.pull_request.labels.*.name, 'release'))\n    steps:\n      - name: Checkout source\n        uses: actions/checkout@v4\n        with:\n          # Check out all history so that the previous release tag can be\n          # found:\n          fetch-depth: 0\n\n      - name: Prepare release\n        uses: datalad/release-action/release@v1\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n\n# Command: `labels`\n\nThis repository also provides a command for creating or updating the GitHub\nlabels used by the actions and their workflows in a repository.  The\nrecommended way to invoke this command is via\n[nox](https://pypi.org/project/nox/); after installing nox, the \"labels\"\ncommand can be invoked by running the following in a clone of this repository:\n\n    GITHUB_TOKEN=... nox -e labels -- repo-owner/repo-name path/to/config/file\n\nwhere `GITHUB_TOKEN` is set to a GitHub API token with permission to modify\nlabels in the desired repository, `repo-owner/repo-name` is replaced with the\nowner \u0026 name of the GitHub repository whose labels you want to update, and\n`path/to/config/file` is a path to a `.datalad-release-action.yaml`\nconfiguration file for the desired repository.\n\n\n# Command: `populate-workflows.sh`\n\nThis repository also includes a shell script, `populate-workflows.sh`, for\nautomatically creating or updating the sample workflows shown above in a\nrepository.  Run it with `./populate-workflows.sh path/to/local/repo/clone`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalad%2Frelease-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatalad%2Frelease-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalad%2Frelease-action/lists"}