-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add release automation (#45)
feat(ci): add release automation (#45)
- Loading branch information
Showing
9 changed files
with
4,260 additions
and
16,450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# PR Linting workflow | ||
name: PR-lint | ||
|
||
on: | ||
pull_request: | ||
types: [edited, opened, reopened, synchronize] | ||
|
||
jobs: | ||
commit-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v2 | ||
|
||
pr-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,4 +90,7 @@ TestCache.xml | |
TestsResultsCache.xml | ||
|
||
tests/ | ||
_site/ | ||
_site/ | ||
|
||
# direnv | ||
.envrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx commitlint --edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Maintaining | ||
|
||
## Release Process | ||
|
||
The release process is composed by multiple standards and utilities combined together: | ||
|
||
- [Conventional Commits](https://conventionalcommits.org/) based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines) are used to keep standard commit messages all around the project | ||
- [Semantic Versioning (SemVer) Specification](https://semver.org/) is used to determine the version format of each new release | ||
- [conventional-changelog/standard-version](https://github.com/conventional-changelog/standard-version) automatizes the process of creating a new release based on the commit history | ||
- [conventional-github-releaser/conventional-github-releaser](https://github.com/conventional-changelog/releaser-tools/tree/master/packages/conventional-github-releaser) takes care of publishing the new release on GitHub | ||
|
||
### Pre-requisites | ||
|
||
1. Create a new [GitHub Personal Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) | ||
2. Set the `CONVENTIONAL_GITHUB_RELEASER_TOKEN` environment variable with the github personal token value (you can use [direnv](https://direnv.net/)) | ||
|
||
### Releasing a new version | ||
|
||
```sh | ||
$ npm run release | ||
``` | ||
|
||
This command will: | ||
|
||
- Create a new version based on the commit types from `HEAD` and `package.json` version | ||
- Create the changelog with all the commits from `HEAD` and the last tag version following [keepachangelog](https://keepachangelog.com/en/1.0.0/) | ||
- Create a new commit to update the following files: `CHANGELOG.md`, `package.json` and `package-lock.json` | ||
- Create a new tag following the SemVer Standard | ||
- Push this tag to the remote | ||
- Trigger the new version publication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ['@commitlint/config-angular'] }; |
Oops, something went wrong.