From 097d17977005c3fd0527ed03366a78b2dac8f8fc Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Wed, 9 Feb 2022 15:32:44 -0300 Subject: [PATCH 1/5] Update: Modifying environments (dev, stg and prd) to (alpha, beta and production) --- .github/workflows/deploy.yml | 10 +++++----- .github/workflows/test.yml | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1ace0b6..003f491 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,8 +2,8 @@ name: Deploy on: push: branches: - - dev - - stg + - alpha + - beta - main jobs: @@ -26,11 +26,11 @@ jobs: [ 'main', { - name: 'dev', + name: 'alpha', prerelease: true }, { - name: 'stg', + name: 'beta', prerelease: true } ] @@ -62,7 +62,7 @@ jobs: shell: bash run: | if [ ${GITHUB_REF} == "refs/heads/main" ]; then - echo "##[set-output name=result;]$(echo "prd")" + echo "##[set-output name=result;]$(echo "production")" else echo "##[set-output name=result;]$(echo ${GITHUB_REF#refs/heads/})" fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6095edf..cc65444 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,9 @@ name: Test on: pull_request: branches: - - dev + - alpha + - beta + - main jobs: test: From 8fae9ccc71a586523e0e09632d19e96f99c06bd3 Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Wed, 9 Feb 2022 15:53:37 -0300 Subject: [PATCH 2/5] improvements: Improvements to version release rules --- .releaserc.json | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.releaserc.json b/.releaserc.json index e436ceb..55c00d1 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -5,28 +5,32 @@ { "preset": "eslint", "releaseRules": [ - { "tag": "Breaking", "release": "major" }, - { "tag": "Build", "release": "minor" }, - { "tag": "Chore", "release": "minor" }, - { "tag": "Fix", "release": "patch" }, - { "tag": "New", "release": "minor" }, - { "tag": "Update", "release": "minor" }, - { "tag": "Upgrade", "release": "minor" } + { "tag": "feat", "release": "major" }, + { "tag": "fix", "release": "minor" }, + { "tag": "breaking", "release": "minor" }, + { "tag": "improvement", "release": "minor" }, + { "tag": "perf", "release": "minor" }, + { "tag": "revert", "release": "patch" }, + { "tag": "docs", "release": "patch" }, + { "tag": "test", "release": "minor" }, + { "tag": "ci", "release": "minor" } ] } ], [ - "@semantic-release/release-notes-generator", + "@semantic-release/release-notes-generator", { "preset": "eslint", "releaseRules": [ - { "tag": "Breaking", "release": "major" }, - { "tag": "Build", "release": "minor" }, - { "tag": "Chore", "release": "minor" }, - { "tag": "Fix", "release": "patch" }, - { "tag": "New", "release": "minor" }, - { "tag": "Update", "release": "minor" }, - { "tag": "Upgrade", "release": "minor" } + {"type": "feat", "section": "Features"}, + {"type": "fix", "section": "Bug Fixes"}, + {"type": "breaking", "section": "Breaking Changes"}, + {"type": "perf", "section": "Performance Improvements"}, + {"type": "improvement", "section": "Improvement"}, + {"type": "revert", "section": "Reverts"}, + {"type": "docs", "section": "Documentation"}, + {"type": "test", "section": "Tests"}, + {"type": "ci", "section": "Continuous Integration"} ] } ], From 160a745cbae09a5b29f3a5b6e6551887b5835250 Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Wed, 9 Feb 2022 18:58:11 -0300 Subject: [PATCH 3/5] CI: Update CI/CD --- .github/workflows/deploy.yml | 1 - .releaserc.json | 36 ++++++++++++++---------------------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 003f491..11a0e09 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,6 @@ jobs: with: semantic_version: 16 extra_plugins: | - @semantic-release/changelog @semantic-release/git conventional-changelog-eslint branches: | diff --git a/.releaserc.json b/.releaserc.json index 55c00d1..d60d411 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -5,33 +5,25 @@ { "preset": "eslint", "releaseRules": [ - { "tag": "feat", "release": "major" }, - { "tag": "fix", "release": "minor" }, - { "tag": "breaking", "release": "minor" }, - { "tag": "improvement", "release": "minor" }, - { "tag": "perf", "release": "minor" }, - { "tag": "revert", "release": "patch" }, - { "tag": "docs", "release": "patch" }, - { "tag": "test", "release": "minor" }, - { "tag": "ci", "release": "minor" } + { "tag": "Fix", "release": "patch" }, + { "tag": "Feat", "release": "minor" }, + { "tag": "Update", "release": "minor" }, + { "tag": "Upgrade", "release": "minor" }, + { "tag": "Breaking", "release": "major" }, + { "tag": "Docs", "release": "minor" }, + { "tag": "Chore", "release": "minor" }, + { "tag": "Build", "release": "minor" }, + { "tag": "Refactor", "release": "minor" }, + { "tag": "Test", "release": "minor" }, + { "tag": "CI", "release": "minor" }, + { "tag": "Perf", "release": "minor" } ] } ], [ - "@semantic-release/release-notes-generator", + "@semantic-release/release-notes-generator", { - "preset": "eslint", - "releaseRules": [ - {"type": "feat", "section": "Features"}, - {"type": "fix", "section": "Bug Fixes"}, - {"type": "breaking", "section": "Breaking Changes"}, - {"type": "perf", "section": "Performance Improvements"}, - {"type": "improvement", "section": "Improvement"}, - {"type": "revert", "section": "Reverts"}, - {"type": "docs", "section": "Documentation"}, - {"type": "test", "section": "Tests"}, - {"type": "ci", "section": "Continuous Integration"} - ] + "preset": "eslint" } ], "@semantic-release/github", From 51d65414a2027aa4d8df97c114f67142ad613bea Mon Sep 17 00:00:00 2001 From: alexsanderp Date: Wed, 9 Feb 2022 19:14:55 -0300 Subject: [PATCH 4/5] CI: Adding semantic-release/npm to modify package.json version --- .github/workflows/deploy.yml | 4 ++++ .releaserc.json | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 11a0e09..4a84043 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,6 +20,7 @@ jobs: semantic_version: 16 extra_plugins: | @semantic-release/git + @semantic-release/npm conventional-changelog-eslint branches: | [ @@ -72,6 +73,7 @@ jobs: uses: aws-actions/amazon-ecr-login@v1 - name: Build, Tag, and Push Image to AWS ECR + if: steps.semantic.outputs.new_release_published == 'true' env: ENV: ${{ steps.extract_environment.outputs.result }} IMAGE_TAG: ${{ steps.semantic.outputs.new_release_version }} @@ -80,6 +82,7 @@ jobs: docker-compose -f build.docker-compose.yml push - name: Create ZIP file to Deploy AWS Beanstalk + if: steps.semantic.outputs.new_release_published == 'true' env: ENV: ${{ steps.extract_environment.outputs.result }} IMAGE_TAG: ${{ steps.semantic.outputs.new_release_version }} @@ -89,6 +92,7 @@ jobs: zip deploy.zip docker-compose.yml - name: Deploy AWS Beanstalk + if: steps.semantic.outputs.new_release_published == 'true' env: ENV: ${{ steps.extract_environment.outputs.result }} AWS_REGION: us-east-1 diff --git a/.releaserc.json b/.releaserc.json index d60d411..8484a9f 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -26,6 +26,7 @@ "preset": "eslint" } ], + "@semantic-release/npm", "@semantic-release/github", [ "@semantic-release/git", { From bd40d4f0bf1dbe6d425baf2556da8928768f3900 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 9 Feb 2022 22:17:42 +0000 Subject: [PATCH 5/5] chore(release): 1.0.0-alpha.2 [skip ci] # [1.0.0-alpha.2](https://github.com/dadosfera/maestro/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2022-02-09) ### CI * Adding semantic-release/npm to modify package.json version ([51d6541](https://github.com/dadosfera/maestro/commit/51d65414a2027aa4d8df97c114f67142ad613bea)) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e0f964..a1e7dfb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc-server-and-client-nestjs-micro-pattern", - "version": "0.0.1", + "version": "1.0.0-alpha.2", "description": "", "author": "", "private": true,