{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1476","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1476/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1476/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1476/events","html_url":"https://github.com/travis-ci/travis-ci/issues/1476","id":20371663,"number":1476,"title":"Feature Request: automatically create (and push) Git tag after successful build","user":{"login":"wireframe","id":12001,"avatar_url":"https://avatars.githubusercontent.com/u/12001?v=3","gravatar_id":"","url":"https://api.github.com/users/wireframe","html_url":"https://github.com/wireframe","followers_url":"https://api.github.com/users/wireframe/followers","following_url":"https://api.github.com/users/wireframe/following{/other_user}","gists_url":"https://api.github.com/users/wireframe/gists{/gist_id}","starred_url":"https://api.github.com/users/wireframe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireframe/subscriptions","organizations_url":"https://api.github.com/users/wireframe/orgs","repos_url":"https://api.github.com/users/wireframe/repos","events_url":"https://api.github.com/users/wireframe/events{/privacy}","received_events_url":"https://api.github.com/users/wireframe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/travis-ci/travis-ci/labels/deployment","name":"deployment","color":"444444"},{"url":"https://api.github.com/repos/travis-ci/travis-ci/labels/feature-request","name":"feature-request","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2013-10-02T02:49:48Z","updated_at":"2015-02-10T17:33:00Z","closed_at":"2014-05-01T15:12:25Z","body":"I'm able to (kindof) accomplish this via .travis.yaml `after_success`, but it's clunky to say the least and seems like a prime candidate for some kind of support built right into travis.\r\n\r\nexample work around:\r\n```yml\r\nafter_success:\r\n  - git config --global user.email \"builds@travis-ci.com\"\r\n  - git config --global user.name \"Travis CI\"\r\n  - export GIT_TAG=build-$TRAVIS_BRANCH-$(date -u \"+%Y-%m-%d-%H-%M-%S\")-$TRAVIS_BUILD_NUMBER\r\n  - git tag $GIT_TAG -a -m \"Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER\"\r\n  - git push origin $GIT_TAG\r\n```"},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/73744009","html_url":"https://github.com/travis-ci/travis-ci/issues/1476#issuecomment-73744009","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/1476","id":73744009,"user":{"login":"mgk","id":465265,"avatar_url":"https://avatars.githubusercontent.com/u/465265?v=3","gravatar_id":"","url":"https://api.github.com/users/mgk","html_url":"https://github.com/mgk","followers_url":"https://api.github.com/users/mgk/followers","following_url":"https://api.github.com/users/mgk/following{/other_user}","gists_url":"https://api.github.com/users/mgk/gists{/gist_id}","starred_url":"https://api.github.com/users/mgk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgk/subscriptions","organizations_url":"https://api.github.com/users/mgk/orgs","repos_url":"https://api.github.com/users/mgk/repos","events_url":"https://api.github.com/users/mgk/events{/privacy}","received_events_url":"https://api.github.com/users/mgk/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T17:33:00Z","updated_at":"2015-02-10T17:33:00Z","body":"Any thoughts to re-opening this? I have used the manual method (thanks @wireframe). While workable, it is clunky and can easily cause an infinite build loop, as has been discussed.\r\n\r\nSecurity note: the ` > /dev/null 2>&1` part of the the `git push` command is important. Without it your GH token can be exposed in the downloaded build log even though it is a hidden environment variable.  "}}