{"id":13495701,"url":"https://github.com/dominique-mueller/automatic-release","last_synced_at":"2025-06-30T22:06:20.015Z","repository":{"id":48845109,"uuid":"86988051","full_name":"dominique-mueller/automatic-release","owner":"dominique-mueller","description":"[DEPRECATED] Automates the release process for GitHub projects.","archived":false,"fork":false,"pushed_at":"2025-05-21T09:16:05.000Z","size":827,"stargazers_count":45,"open_issues_count":12,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-06-05T04:43:19.472Z","etag":null,"topics":["automatic","ci","deploy","github","node","npm","publish","release","semantic","travis"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/automatic-release","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/dominique-mueller.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":"2017-04-02T13:29:22.000Z","updated_at":"2024-11-30T05:19:23.000Z","dependencies_parsed_at":"2025-01-10T13:34:05.520Z","dependency_job_id":"92965bbe-2886-4b74-a4cb-d6c3e03d476b","html_url":"https://github.com/dominique-mueller/automatic-release","commit_stats":{"total_commits":91,"total_committers":3,"mean_commits":"30.333333333333332","dds":0.4505494505494505,"last_synced_commit":"582978b6b9bceedca4a6791c810c26bf39e15259"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dominique-mueller/automatic-release","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominique-mueller%2Fautomatic-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominique-mueller%2Fautomatic-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominique-mueller%2Fautomatic-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominique-mueller%2Fautomatic-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominique-mueller","download_url":"https://codeload.github.com/dominique-mueller/automatic-release/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominique-mueller%2Fautomatic-release/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262857279,"owners_count":23375492,"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":["automatic","ci","deploy","github","node","npm","publish","release","semantic","travis"],"created_at":"2024-07-31T19:01:37.294Z","updated_at":"2025-06-30T22:06:19.952Z","avatar_url":"https://github.com/dominique-mueller.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cbr\u003e\n\n---\n\n**DEPRECATION NOTICE**\n\nThis library is now deprecated, I suggest using **[semantic-release](https://github.com/semantic-release/semantic-release)** as an\nalterantive.\n\n---\n\n\u003cbr\u003e\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# automatic-release\n\n**Automates the release process for GitHub projects.**\n\n\u003c/div\u003e\n\n\u003cbr\u003e\u003cbr\u003e\n\n## What it does\n\nCreating and managing projects on GitHub usually requires lots of time and effort. When developing libraries, in particular, the tasks\nrequired for publishing new releases are often very long, complex, and error-prone.\n\nMeet **automatic-release**, a NodeJS-based command line tool which makes new library releases \"a matter of a single click\", allowing\ndevelopers to focus on the important things - developing! **automatic-release** achieves that by automating the whole release process. This\nincludes\n\n- incrementing version numbers,\n- generating changelogs,\n- creating Git tags,\n- and creating GitHub releases.\n\n\u003e Once following the **Git Flow** branching model and the Angular **Git Commit Conventions** as well as using a Continuous Integration\n\u003e platform such as **Travis CI**, publishing a new library release to NPM \u0026 GitHub gets as simple as merging the latest `develop` state into\n\u003e the `master` branch.\n\n![Automatic Release Preview](/docs/preview.png?raw=true)\n\n\u003cbr\u003e\u003cbr\u003e\n\n## How to install\n\nYou can get **automatic-release** via **npm** by either adding it as a new devDependency to your `package.json` file and running\n`npm install`, or running the following command:\n\n``` bash\nnpm install automatic-release --save-dev\n```\n\n### Requirements\n\n- **automatic-release** requires at least **NodeJS 7.6** (or higher). *Earlier 7.x versions of NodeJS (7.0 to 7.5) might also work when\nexecuting **automatic-release** using the `--harmony-async-await` flag.*\n\n- **automatic-release** expects a `package.json` and a `CHANGELOG.md` file at the project root. Further on, the `package.json` file should\nat least contain a package name, a version, and a valid GitHub repository URL.\n\n\u003cbr\u003e\u003cbr\u003e\n\n## How to use\n\n### Following the (Angular) Git Commit Convention\n\nInternally, **automatic-release** analyzes the commit history in order to evaluate version numbers and generate changelogs. To make this\nwork, developers must follow a specific convention when making commits. Such a commit convention usually describes the structure and naming\nof the commit message (type, scope, message), the commit body (further details), and the commit footer (breaking changes, issues this commit\nfixes).\n\nAs of now, **automatic-release** expects the **Angular Commit Message Format** to be used. For more details, read the full **[Angular Commit Message Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines)**. In short, commits following this convention look like the following:\n\n```\n\u003ctype\u003e(\u003cscope\u003e): \u003csubject\u003e\n\u003cBLANK LINE\u003e\n\u003cbody\u003e\n\u003cBLANK LINE\u003e\n\u003cfooter\u003e\n```\n\n\u003e **Quick Tip:** I personally do not recommend forcing developers to follow this convention for every single commit, as this might lead to\nless commits being made in general. Instead, it's probably better to squash commits when merging PRs, and then only name the PR merge commit\nafter the naming convention.\n\n\u003cbr\u003e\n\n### Using Git Flow\n\nMoreover, following the **Git Flow** branching model is highly recommended. To summarize, **Git Flow** proposes a number of branch types\nsuch as the *master* branch (containing the latest release), the *develop* branch (as the \"master during development\"), and multiple\n*feature \u0026 bugfix branches* (enabling developers to work in parallel). For more details, continue reading at\n**[A successful Git branching model](http://nvie.com/posts/a-successful-git-branching-model/)**.\n\nUtilizing this concept simplifies the release management significantly (amongst further advantages it has for the overall development\nworkflow). However, **automatic-release** does not require all the branches **Git Flow** proposes to exist. It only expects the following\ntwo branches to exist and get used correctly:\n\n- the **master** branch, containing the latest (published) release\n- the **develop** branch as the main development branch\n\n\u003e **Quick Tip:** Makde the **develop** branch the project's *default branch* so that Pull Requests are always opened against **develop**\n\u003e and not **master**.\n\n\u003cbr\u003e\n\n### Integration with Travis CI\n\n#### Step 1: Setup repository for Travis CI\n\nFirst of all, setup **Travis CI** for your GitHub repository by\n\n- connecting your Travis CI account to your GitHub account,\n- enabling the GitHub repository for Travis CI,\n- and having a `.travis.yml` configuration file set up.\n\n\u003e For further details on how to setup Travis CI, continue reading the official\n**[Travis CI - Getting Started](https://docs.travis-ci.com/user/getting-started/)** guide.\n\n#### Step 2: Add environment variables\n\nWithin Travis CI, select your GitHub project, go to *More Options / Settings* and make sure the following **Environment Variables** are\ndefined:\n\n`GH_TOKEN`: This environment variable defines the **GitHub Access Token**, enabling **automatic-release** to push commits and tags to GitHub\nas well as create GitHub releases.\n\u003e To generate this token, visit your **[GitHub - Personal Access Tokens](https://github.com/settings/tokens)** page, click *Generate new\ntoken*, select (at least) the *repo / public_repo* scope access and finish up by hitting *Generate token*.\n\n`NPM_TOKEN`: This environment variable defines the **NPM Authentication Token**, needed by Travis CI to deploy your library to the public\nNPM registry.\n\n\u003e Getting this token is as simple as logging into your NPM account locally and copying the `authToken` from your `.npmrc` file. A detailed\ninstruction can be found **[right here](http://blog.npmjs.org/post/118393368555/deploying-with-npm-private-modules)**.\n\n`FORCE_COLOR`: This environment variable (forcefully) enables colorful logging output when set to `1`. If the **automatic-release** logging\noutput is black'n'white only this variable might help.\n\n#### Step 3: Extend Travis CI configuration file\n\nFinally, setup the automated release process by extending the `.travis.yml` configuration file. First, make sure bothh the `master` and\n`develop` branches are included in the `branches` block. For example:\n``` yml\nbranches:\n  only:\n    - master\n    - develop\n```\n\nNext, add **automatic-release** to the `scripts` block of your `package.json` file to make it available to `npm run` commands:\n\n``` json\n{\n  \"scripts\": {\n    \"automatic-release\": \"automatic-release\"\n  }\n}\n```\n\nThen, define a new Travis CI job for releases containing (at least) the following commands (replace `\u003c...\u003e` with actual data):\n\n``` yml\njobs:\n  include:\n    - stage: release\n      before_install:\n        # Clone the whole repository because we also need the develop branch for releasing\n        - git clone \"https://github.com/$TRAVIS_REPO_SLUG.git\" \"$TRAVIS_REPO_SLUG\";\n        - cd \"$TRAVIS_REPO_SLUG\";\n        - git checkout -qf \"$TRAVIS_COMMIT\";\n        #  Fix Travis CI issue of detached heads in git\n        - git checkout master\n      install:\n        # ...\n      script:\n        # ...\n      before_deploy:\n        # Login to Git to be able to make commits (required by automatic-release)\n        - git config --global user.name \"\u003cGITHUB-USER-NAME\u003e\"; # REPLACE!\n        - git config --global user.email \"\u003cGITHUB-USER-EMAIL\u003e\"; # REPLACE!\n        - git config credential.helper \"store --file=.git/credentials\";\n        - echo \"https://$GH_TOKEN:@github.com\" \u003e .git/credentials;\n        # Run automatic-release\n        - npm run automatic-release\n      deploy:\n        provider: npm\n        email: \u003cNPM_USER_EMAIL\u003e # REPLACE!\n        api_key: \"$NPM_TOKEN\"\n        skip_cleanup: true\n```\n\n\u003e If you plan to publish from a directory other than the root, don't forget to navigate into the folder in the `before_deploy` section.\n\u003e Also, you might need to copy the updated `package.json` and `CHANGELOG.md` file into your publish directory after running\n\u003e **automatic-release** yet before running the npm deploy.\n\nFinally, use the release job defined above in your stages with the master branch condition:\n\n``` yml\nstages:\n  - name: release\n    if: branch = master\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominique-mueller%2Fautomatic-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominique-mueller%2Fautomatic-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominique-mueller%2Fautomatic-release/lists"}