Skip to content

Commit

Permalink
feat: add a command to publish a release on Github
Browse files Browse the repository at this point in the history
add release-github command to generate a release, push it to master, and
create a Github release with commit metadata.
it uses conventional-github-releaser to create the Github release.
  • Loading branch information
antoine-amara authored and Antoine AMARA committed Apr 13, 2021
1 parent f3ce51e commit 0702070
Show file tree
Hide file tree
Showing 3 changed files with 509 additions and 33 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ logs: ## display logs from the development server. This command can be used only
destroy: ## switch off and destroy the development server instance. This command can be used only on watch mode.
${DC} down

release-github: ## create a release push on master and create a github release with the git meta-data. example to release a minor: 'make github-release gh-token="<token>" target="minor"'
git checkout master
${MAKE} release target=${target}
git push --tags origin master
${DC} run --rm -e CONVENTIONAL_GITHUB_RELEASER_TOKEN=${gh-token} ${WEBSITE} ${YN} release-github

release: ## create a release with a target (major, minor or patch), increment the version into package.json, create the Changelog, and finally create a git tag and commit it. example to release a minor: 'make release target="minor"'.
${DC} run -v ~/.gitconfig:/etc/gitconfig --rm ${WEBSITE} ${YN} release -- --release-as ${target}

Expand All @@ -75,6 +81,6 @@ help: ## show this help.


.PHONY:
init run watch package clean check style test restart command dependencies logs destroy release analyze build-gcp-image gcp-init gcp-deploy gcp-destroy help
init run watch package clean check style test restart command dependencies logs destroy release-github release analyze build-gcp-image gcp-init gcp-deploy gcp-destroy help
.SILENT:
init run watch package clean check style test restart command dependencies logs destroy release analyze build-gcp-image gcp-init gcp-deploy gcp-destroy help
init run watch package clean check style test restart command dependencies logs destroy release-github release analyze build-gcp-image gcp-init gcp-deploy gcp-destroy help
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"private": true,
"scripts": {
"release": "standard-version",
"release-github": "conventional-github-releaser -p angular",
"serve": "yarn build && http-server ./dist -a 0.0.0.0 -p 3000",
"serve:dev": "webpack serve --config webpack.dev.js",
"package": "rm -f website.zip && yarn build && cd dist/ && bestzip ../website.zip *",
Expand All @@ -25,6 +26,7 @@
"babel-loader": "^8.2.2",
"bestzip": "^2.2.0",
"clean-webpack-plugin": "^4.0.0-alpha.0",
"conventional-github-releaser": "^3.1.5",
"copy-webpack-plugin": "^8.1.1",
"core-js": "^3.10.1",
"css-loader": "^5.2.1",
Expand Down Expand Up @@ -55,6 +57,7 @@
"webpack-merge": "^5.7.3"
},
"resolutions": {
"axios": "^0.21.1"
"axios": "^0.21.1",
"dot-prop": "^4.2.1"
}
}
Loading

0 comments on commit 0702070

Please sign in to comment.