From 30a30284118bd6066c4cdce884e366455b6bdcc7 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Fri, 17 Sep 2021 14:25:50 +0300 Subject: [PATCH] chore: use conventional commits and auto-generate changelog --- .github/workflows/commitlint.yml | 11 +++++++++++ .github/workflows/release.yml | 4 +++- CHANGELOG.md | 5 ----- package.json | 8 ++++++++ scripts/release.sh | 3 +++ 5 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/commitlint.yml create mode 100644 package.json diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..67e6df3 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,11 @@ +name: Lint Commit Messages +on: [pull_request] + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 045cbc8..9168cad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,4 +12,6 @@ jobs: - uses: actions/checkout@v2 - uses: ncipollo/release-action@v1 with: - body: Check CHANGELOG.md for details + body: + Please refer to + [CHANGELOG.md](https://github.com/go-redis/redis/blob/master/CHANGELOG.md) for details diff --git a/CHANGELOG.md b/CHANGELOG.md index 63aabd3..ac71382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,3 @@ -# Changelog - -> :heart: -> [**Uptrace.dev** - All-in-one tool to optimize performance and monitor errors & logs](https://uptrace.dev) - ## v8.11 - Remove OpenTelemetry metrics. diff --git a/package.json b/package.json new file mode 100644 index 0000000..c5b0d13 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "redis", + "version": "0.0.0", + "main": "index.js", + "repository": "git@github.com:go-redis/redis.git", + "author": "Vladimir Mihailenco ", + "license": "BSD-2-clause" +} diff --git a/scripts/release.sh b/scripts/release.sh index fe9f74b..62b33bc 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -58,6 +58,9 @@ do done sed --in-place "s/\(return \)\"[^\"]*\"/\1\"${TAG#v}\"/" ./version.go +sed --in-place "s/\(\"version\": \)\"[^\"]*\"/\1\"${TAG#v}\"/" ./package.json + +conventional-changelog -p angular -i CHANGELOG.md -s git checkout -b release/${TAG} master git add -u