{"id":22300334,"url":"https://github.com/dropseed/nextrelease","last_synced_at":"2025-07-29T02:31:40.760Z","repository":{"id":39128451,"uuid":"404885623","full_name":"dropseed/nextrelease","owner":"dropseed","description":"One-click release publishing by merging an automated PR.","archived":false,"fork":false,"pushed_at":"2023-11-28T20:28:37.000Z","size":109,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-30T14:55:36.654Z","etag":null,"topics":["actions","release-automation"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dropseed.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":null,"security":null,"support":null,"governance":null}},"created_at":"2021-09-09T22:23:16.000Z","updated_at":"2021-10-06T18:36:31.000Z","dependencies_parsed_at":"2023-11-28T21:44:29.868Z","dependency_job_id":"f451cf35-0a2f-423d-b4aa-9ace15b0e244","html_url":"https://github.com/dropseed/nextrelease","commit_stats":{"total_commits":70,"total_committers":3,"mean_commits":"23.333333333333332","dds":0.2142857142857143,"last_synced_commit":"a2f1091abe71240b15f15aafc80890ff0ab8e11e"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropseed%2Fnextrelease","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropseed%2Fnextrelease/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropseed%2Fnextrelease/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropseed%2Fnextrelease/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropseed","download_url":"https://codeload.github.com/dropseed/nextrelease/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227971951,"owners_count":17849421,"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-automation"],"created_at":"2024-12-03T18:10:32.927Z","updated_at":"2024-12-03T18:10:33.635Z","avatar_url":"https://github.com/dropseed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nextrelease\n\n\u003cimg src=\"https://user-images.githubusercontent.com/649496/132932159-942f85cc-8f9e-4577-90f4-2315dded6d3f.png\" width=\"150\" height=\"150\" align=\"right\" /\u003e\n\n**One-click release publishing by merging the nextrelease PR.**\n\nHere's what it does:\n- opens a release PR when there are unreleased commits (\"Release version \\\u003cnext\\\u003e\")\n- lists out the commits that would be released\n- **\\\u003cyou choose a semver label\\\u003e** (\"release: minor\")\n- renames PR with the semver version (\"Release version 1.1.0\")\n- updates version strings in files (or other \"prep\" commands)\n- **\\\u003cyou merge the PR\\\u003e**\n- creates git tag on the merged commit\n- publishes the package (can be any \"publish\" commands)\n- creates a GitHub Release\n\n![nextrelease example PR](https://user-images.githubusercontent.com/649496/132930548-537e53ff-e7bc-4e05-8f65-cf03b8cf33e0.png)\n\n## GitHub Action\n\nSave this as `.github/workflows/nextrelease.yml` and tweak as needed:\n\n```yml\nname: nextrelease\non:\n  push:\n    branches: [master]\n  pull_request:\n    branches: [master]\n    types: [labeled, unlabeled, edited, synchronize]\n\njobs:\n  sync:\n    if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' \u0026\u0026 github.head_ref == 'nextrelease' }}\n    runs-on: ubuntu-latest\n    steps:\n    - uses: dropseed/nextrelease@v2\n      with:\n        prepare_cmd: |\n          sed -i -e \"s/version = \\\"[^\\\"]*\\\"$/version = \\\"$VERSION\\\"/g\" pyproject.toml\n        publish_cmd: |\n          poetry publish --build\n        github_token: ${{ secrets.GITHUB_TOKEN }}\n        tag_prefix: v  # default\n        next_branch: nextrelease  # default\n        github_release: publish  # or \"draft\", or \"skip\"\n        release_notes: \"\"  # or \"generate\" to use https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes\n```\n\n### Using `prepare_cmd`\n\nThe `prepare_cmd` is typically used to update the version number (like in `package.json` or `pyproject.toml`).\nThis is easy enough to do with sed, but you can use anything you like.\n**Any file modifications will be committed automatically** and you can use it for other automated tasks like updating changelogs.\nIf you have a \"release prep\" step that you can't automate, you can always edit files manually in the release PR.\n\n#### Available env variables\n\n- `VERSION` - the semver name for this release\n- `LAST_VERSION` - the semver name for the previous release (or `0.0.0` if this will be the first release)\n- `NEXT_VERSION` - the semver name for this release (alias for `VERSION`)\n\n### Using `publish_cmd`\n\nThe `publish_cmd` happens after the new version is tagged and the GitHub Release is created.\nThis is typically used to push your release to a package manager (`npm publish`),\nbut can also be used for moving tags or uploading assets to your GitHub Release.\n*This command will run from your master/main branch and doesn't expect any local file changes, so nothing will be committed automatically.*\n\n#### Available env variables\n\n- `TAG` - the full tag name associated with the release (ex. \"v1.2.0-beta+unix\")\n- `VERSION` - the semver name for this release (ex. \"1.2.0-beta+unix\")\n- `VERSION_MAJOR` - the semver major version for this release (ex. \"1\")\n- `VERSION_MINOR` - the semver minor version for this release (ex. \"2\")\n- `VERSION_PATCH` - the semver patch version for this releaes (ex. \"0\")\n- `VERSION_PRERELEASE` - the semver prerelease name for this release (ex. \"beta\")\n- `VERSION_BUILD` - the semver build name for this release (ex. \"unix\")\n\n### Other notes\n\n- If you haven't tagged/released anything yet, any version strings in your files should be \"0.0.0\".\n- You could also run this on a `schedule` instead of every commit to main/master, but the list of commits you see in the PR could be outdated.\n- You can trigger the tagging/publishing by pushing a commit titled \"Release version \\\u003cversion\\\u003e\" manually. Just don't forget to do any pre-tagging steps like update your package.json, etc.\n- Regular merge commits (i.e. not squash or rebase) haven't been tested. I'd strongly recommend squash commits anyway as it will make the history much simpler.\n\n## Example Workflows\n\n### PyPI using Poetry\n\n```yaml\n    - uses: dropseed/nextrelease@v2\n      env:\n        POETRY_PYPI_TOKEN_PYPI: ${{ secrets.YOUR_PYPI_TOKEN }}\n      with:\n        prepare_cmd: |\n          sed -i -e \"s/version = \\\"[^\\\"]*\\\"$/version = \\\"$VERSION\\\"/g\" pyproject.toml\n        publish_cmd: |\n          pip3 install -U pip poetry \u0026\u0026 poetry publish --build --no-interaction\n```\n\n### GitHub Action\n\n```yaml\n    - uses: dropseed/nextrelease@v2\n      with:\n        publish_cmd: |\n          git tag -a v$VERSION_MAJOR -m v$VERSION_MAJOR -f \u0026\u0026 git push origin v$VERSION_MAJOR -f\n```\n\n### npm\n\n```yaml\n    - uses: actions/setup-node@v2\n      with:\n        node-version: '16'\n        registry-url: 'https://registry.npmjs.org'\n    - uses: dropseed/nextrelease@v2\n      env:\n        NODE_AUTH_TOKEN: ${{ secrets.YOUR_NPM_TOKEN }}\n      with:\n        prepare_cmd: |\n          npm version $NEXT_VERSION --no-git-tag-version --allow-same-version\n        publish_cmd: |\n          npm publish\n        github_token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Uploading GitHub release assets\n\n```yaml\n    - uses: dropseed/nextrelease@v2\n      with:\n        prepare_cmd: |\n          sed -i -e \"s/version = \\\"[^\\\"]*\\\"$/version = \\\"$VERSION\\\"/g\" pyproject.toml\n        publish_cmd: |\n          poetry build\n          gh release upload $TAG dist/*\n        github_token: ${{ secrets.GITHUB_TOKEN }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropseed%2Fnextrelease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropseed%2Fnextrelease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropseed%2Fnextrelease/lists"}