Complete CI/CD flow to work with GitHub Actions.
For now the workflows work only for repositories with the master/main
branch. If you are working with develop
and created something, please send a PR.
This repository it's a template with the configurations for Release It package.
- Auto generate releases on repository;
- Auto create tags on repository;
- Auto create changelog on repository;
- Auto commit and push changes on repository;
- Handle
version
property onpackage.json
file; - Build and push Docker image to Docker Hub (you can use Docker or not, remove theses steps on workflow files);
- Publish packages to NPM (disabled by default. You will ned to change some things.)
Type | File | Description |
---|---|---|
Create releases | .github/workflows/release.yml |
Create pre-releases and releases. Needs to be dispatch via GitHub interface and fill some fields. Create tag, changelog, release and push image. |
Snapshots | .github/workflows/snapshot.yml |
Create snapshot versions to test changes in any branch/PR. Always triggered. |
Build | .github/workflows/build.yml |
Build and test app, running default NodeJS process steps. |
This repository is template with all configurations for the package release-it
. Bugs or questions about needs to be opened on the original repository.
Simply use this template to create a new repository and start working on your project:
Click on "Use this template > Create a new repository".
- Go to
package.json
and changeversion
property to0.0.0
;- Change other properties like
repository
,author
,license
, etc.
- Change other properties like
- Change the Docker properties to your project name (or remove the files if you don't need Docker);
- Create two secrets on repository:
DOCKERHUB_USERNAME
andDOCKERHUB_TOKEN
(how to create access token docs);
- Create two secrets on repository:
- Create a secret called
NPM_TOKEN
if you desire to publish your package to NPM; - Go to
.github/workflows/
folder and replace with your project settings; - Done โ
Remove Dockerfile
and docker-compose.yml
files and remove the steps on workflow files.
When using Docker + NPM, NPM is responsible by changing version
inside package.json
. If you don't planning to use NPM anymore, then go to .release-it.json
and set the property npm.publish
to false
:
{
"npm": {
+ "publish": false
}
}
For NPM, you can remove NPM login
on workflow files.
Avoid this! Don't recommended!
If you removed some version from NPM or things like that and need to skip a version (I don't known why, but okay...).
Simply change the version
property inside package.json
to a previous version.
Example: if you desire to go to 1.0.2
, change version
property to 1.0.1
and run create release workflow.
This project is licensed under MIT License, so it means it's completely free to use and copy.