Skip to content

Instantly share code, notes, and snippets.

@AGmakonts
Last active February 5, 2022 18:42
Show Gist options
  • Save AGmakonts/ef49d60ea09daed210ef47812b9d03b6 to your computer and use it in GitHub Desktop.
Save AGmakonts/ef49d60ea09daed210ef47812b9d03b6 to your computer and use it in GitHub Desktop.
Automatic GitHub release notes and built package from Circle CI

Automatic GitHub release notes and built package from Circle CI

This config uses github-release and github-release-notes to automatically update release with required artifacts and compose release notes based on commit messages. Follow documentation of thos etwo packages to configure it to your needs.

machine:
node:
version: 6.2.0
environment:
PROJECT_NAME: {INSERT PROJECT NAME}
dependencies:
pre:
- go get github.com/aktau/github-release
- npm install github-release-notes -g
deployment:
release:
tag: /v[0-9]+(\.[0-9]+)*/
commands:
- zip -r $CIRCLE_ARTIFACTS/$PROJECT_NAME-$CIRCLE_TAG.zip dist/*
- git config user.name $CIRCLE_PROJECT_USERNAME
- gren --override --data-source=commits
- github-release upload --user $CIRCLE_PROJECT_USERNAME --repo $CIRCLE_PROJECT_REPONAME --tag $CIRCLE_TAG --name $CIRCLE_PROJECT_REPONAME"."$CIRCLE_TAG"-build-"$CIRCLE_BUILD_NUM".zip" --file $CIRCLE_ARTIFACTS/$PROJECT_NAME-$CIRCLE_TAG.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment