From be817c0f95ad4f1f8a6cee1e13d2ccdd53427df1 Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Fri, 27 Dec 2024 11:36:54 -0300 Subject: [PATCH 01/11] fix: test if vars functionals normal :bug: --- .github/workflows/packages-manager.yml | 62 +++++++++++++------------- chocolatey/tools/chocolateyinstall.ps1 | 2 +- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.github/workflows/packages-manager.yml b/.github/workflows/packages-manager.yml index 5dfa5860..e6eee9ef 100644 --- a/.github/workflows/packages-manager.yml +++ b/.github/workflows/packages-manager.yml @@ -1,15 +1,21 @@ name: "packages manager" on: - release: + pull_request: + branches: + - main types: - - published + - opened + - edited + - synchronize + - reopened jobs: get_branch: runs-on: ubuntu-24.04 outputs: is_main: ${{ steps.verify_branch.outputs.is_main }} + version: ${{ steps.verify_branch.outputs.version }} steps: - uses: actions/checkout@v4 @@ -29,22 +35,31 @@ jobs: echo "is_main=false" >> $GITHUB_OUTPUT fi + $version = $RAW_RELEASE -replace '^v', '' + echo "version=$version" >> $GITHUB_OUTPUT - brew_release: + wait_release: needs: get_branch runs-on: ubuntu-24.04 - if: needs.get_branch.outputs.is_main == 'true' steps: - - name: Update Homebrew Formula - uses: dawidd6/action-homebrew-bump-formula@v4 - with: - token: ${{ secrets.RELEASE_GITHUB_TOKEN }} - formula: mdz + - name: Wait for 30 seconds + run: sleep 30 + + # brew_release: + # needs: [get_branch, wait_job] + # runs-on: ubuntu-24.04 + # if: needs.get_branch.outputs.is_main == 'true' + # steps: + # - name: Update Homebrew Formula + # uses: dawidd6/action-homebrew-bump-formula@v4 + # with: + # token: ${{ secrets.RELEASE_GITHUB_TOKEN }} + # formula: mdz chocolatey_release: - needs: get_branch + needs: [get_branch, wait_job] runs-on: windows-latest - if: needs.get_branch.outputs.is_main == 'true' + # if: needs.get_branch.outputs.is_main == 'true' steps: - name: Checkout code uses: actions/checkout@v3 @@ -55,18 +70,6 @@ jobs: app-id: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_APP_ID }} private-key: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_PRIVATE_KEY }} - - name: Fetch Latest Tag - id: latest_tag - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - $RawRelease = gh release list --repo $env:GITHUB_REPOSITORY --limit 1 --json tagName --jq '.[0].tagName' - $FormattedRelease = $RawRelease -replace '^v', '' - Write-Host "Formatted release: $FormattedRelease" - - echo "version=$FormattedRelease" >> $env:GITHUB_ENV - shell: pwsh - - name: Set up Chocolatey run: | Set-ExecutionPolicy Bypass -Scope Process -Force @@ -83,9 +86,8 @@ jobs: exit 1 } - $version = $env:version - Write-Host "Updating nuspec version to $version" - (Get-Content $nuspecPath) -replace '.*', "$version" | Set-Content $nuspecPath + Write-Host "Updating nuspec version to ${{ needs.get_branch.outputs.version }}" + (Get-Content $nuspecPath) -replace '.*', "${{ needs.get_branch.outputs.version }}" | Set-Content $nuspecPath shell: pwsh - name: Download and extract ZIP @@ -95,7 +97,7 @@ jobs: $zipFile = Join-Path $toolsDir 'mdz.zip' $outputFile = Join-Path $toolsDir 'mdz.exe' - $url = "https://github.com/LerianStudio/midaz/releases/download/v$($env:version)/midaz_$($env:version)_windows_amd64.zip" + $url = "https://github.com/LerianStudio/midaz/releases/download/v${{ needs.get_branch.outputs.version }}/midaz_${{ needs.get_branch.outputs.version }}_windows_amd64.zip" Write-Host "Downloading ZIP from $url to $zipFile" Invoke-WebRequest -Uri $url -OutFile $zipFile @@ -128,12 +130,12 @@ jobs: ls # install local test - choco install mdz --version=$env:version --prerelease --source="D:\a\midaz\midaz" + choco install mdz --version=${{ needs.get_branch.outputs.version }} --prerelease --source="D:\a\midaz\midaz" mdz version choco apikey --set $env:CHOCO_API_KEY - choco push mdz.$env:version.nupkg --source https://push.chocolatey.org/ + choco push mdz.${{ needs.get_branch.outputs.version }}.nupkg --source https://push.chocolatey.org/ # test install public mdz chocolatey - choco install mdz --version=$env:version --prerelease + choco install mdz --version=${{ needs.get_branch.outputs.version }} --prerelease mdz version diff --git a/chocolatey/tools/chocolateyinstall.ps1 b/chocolatey/tools/chocolateyinstall.ps1 index e3d0e969..aee1447f 100644 --- a/chocolatey/tools/chocolateyinstall.ps1 +++ b/chocolatey/tools/chocolateyinstall.ps1 @@ -7,7 +7,7 @@ $binDir = Join-Path $env:ChocolateyInstall 'bin' $outputFile = Join-Path $toolsDir 'mdz.exe' # URL do arquivo zipado -$url = 'https://github.com/LerianStudio/midaz/releases/download/v${version}/midaz_${version}_windows_amd64.zip' +$url = "https://github.com/LerianStudio/midaz/releases/download/"+$version+"/midaz_"+$version+"_windows_amd64.zip" $checksum = '{{CHECKSUM}}' $silentArgs = '' From f1bd4756c86aff250e867d5c222d4245db7cd675 Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Fri, 27 Dec 2024 11:39:05 -0300 Subject: [PATCH 02/11] fix: runner to branch develop :bug: --- .github/workflows/packages-manager.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/packages-manager.yml b/.github/workflows/packages-manager.yml index e6eee9ef..a4a89518 100644 --- a/.github/workflows/packages-manager.yml +++ b/.github/workflows/packages-manager.yml @@ -3,6 +3,7 @@ name: "packages manager" on: pull_request: branches: + - develop - main types: - opened From c7062e79c8b7fec4b39e0bf7fc0a1f8a84b146f0 Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Fri, 27 Dec 2024 11:49:49 -0300 Subject: [PATCH 03/11] fix: name the step wait change update needs of the step from choco :bug: --- .github/workflows/packages-manager.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/packages-manager.yml b/.github/workflows/packages-manager.yml index a4a89518..4cd1fc48 100644 --- a/.github/workflows/packages-manager.yml +++ b/.github/workflows/packages-manager.yml @@ -58,7 +58,7 @@ jobs: # formula: mdz chocolatey_release: - needs: [get_branch, wait_job] + needs: [get_branch, wait_release] runs-on: windows-latest # if: needs.get_branch.outputs.is_main == 'true' steps: From edbf9c5ccf753f51499a7c0458e2d4a072c575a6 Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Fri, 27 Dec 2024 11:56:06 -0300 Subject: [PATCH 04/11] fix: syntax error replace change to sed bash :bug: --- .github/workflows/packages-manager.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/packages-manager.yml b/.github/workflows/packages-manager.yml index 4cd1fc48..f467253f 100644 --- a/.github/workflows/packages-manager.yml +++ b/.github/workflows/packages-manager.yml @@ -36,7 +36,7 @@ jobs: echo "is_main=false" >> $GITHUB_OUTPUT fi - $version = $RAW_RELEASE -replace '^v', '' + version=$(echo "$RAW_RELEASE" | sed 's/^v//') echo "version=$version" >> $GITHUB_OUTPUT wait_release: From d41861296564f2a883f8bbf557169b81bc7e5841 Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Fri, 27 Dec 2024 12:06:30 -0300 Subject: [PATCH 05/11] fix: formatted version in script install cli :bug: --- chocolatey/tools/chocolateyinstall.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chocolatey/tools/chocolateyinstall.ps1 b/chocolatey/tools/chocolateyinstall.ps1 index aee1447f..a9c0aeb7 100644 --- a/chocolatey/tools/chocolateyinstall.ps1 +++ b/chocolatey/tools/chocolateyinstall.ps1 @@ -6,8 +6,10 @@ $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $binDir = Join-Path $env:ChocolateyInstall 'bin' $outputFile = Join-Path $toolsDir 'mdz.exe' +$versionFmt = $version -replace '^v', '' + # URL do arquivo zipado -$url = "https://github.com/LerianStudio/midaz/releases/download/"+$version+"/midaz_"+$version+"_windows_amd64.zip" +$url = "https://github.com/LerianStudio/midaz/releases/download/"+$version+"/midaz_"+$versionFmt+"_windows_amd64.zip" $checksum = '{{CHECKSUM}}' $silentArgs = '' From e07f4912b23046ab2b5ac0bfa8547117bd7f4598 Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Fri, 27 Dec 2024 12:12:52 -0300 Subject: [PATCH 06/11] fix: final :bug: --- .github/workflows/packages-manager.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/packages-manager.yml b/.github/workflows/packages-manager.yml index f467253f..b7a2d19c 100644 --- a/.github/workflows/packages-manager.yml +++ b/.github/workflows/packages-manager.yml @@ -1,15 +1,9 @@ name: "packages manager" on: - pull_request: - branches: - - develop - - main + release: types: - - opened - - edited - - synchronize - - reopened + - published jobs: get_branch: @@ -46,6 +40,7 @@ jobs: - name: Wait for 30 seconds run: sleep 30 + # NOTE: our cli is in homebrew's autobump.txt because it has been updated so much # brew_release: # needs: [get_branch, wait_job] # runs-on: ubuntu-24.04 @@ -60,7 +55,7 @@ jobs: chocolatey_release: needs: [get_branch, wait_release] runs-on: windows-latest - # if: needs.get_branch.outputs.is_main == 'true' + if: needs.get_branch.outputs.is_main == 'true' steps: - name: Checkout code uses: actions/checkout@v3 From 0a64bf8d65b85c81a9f8efbc2b59107b17b19a6a Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Fri, 27 Dec 2024 12:17:44 -0300 Subject: [PATCH 07/11] fix: wait 10 minutes before of the exec push to choco :bug: --- .github/workflows/packages-manager.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packages-manager.yml b/.github/workflows/packages-manager.yml index b7a2d19c..768b345b 100644 --- a/.github/workflows/packages-manager.yml +++ b/.github/workflows/packages-manager.yml @@ -37,8 +37,8 @@ jobs: needs: get_branch runs-on: ubuntu-24.04 steps: - - name: Wait for 30 seconds - run: sleep 30 + - name: Wait for 10 minutes + run: sleep 600 # NOTE: our cli is in homebrew's autobump.txt because it has been updated so much # brew_release: From 07883ff47c7ac29579c23ceb5ae4928cf9ccae86 Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Fri, 27 Dec 2024 13:37:56 -0300 Subject: [PATCH 08/11] fix: wait no runner in develop :bug: --- .github/workflows/packages-manager.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/packages-manager.yml b/.github/workflows/packages-manager.yml index 768b345b..96dccd93 100644 --- a/.github/workflows/packages-manager.yml +++ b/.github/workflows/packages-manager.yml @@ -36,6 +36,7 @@ jobs: wait_release: needs: get_branch runs-on: ubuntu-24.04 + if: needs.get_branch.outputs.is_main == 'true' steps: - name: Wait for 10 minutes run: sleep 600 From 6908198be6cc52b9b7194b55fb4a1c2cb33df0d6 Mon Sep 17 00:00:00 2001 From: lerian-studio Date: Fri, 27 Dec 2024 16:42:20 +0000 Subject: [PATCH 09/11] chore(release): 1.41.0-beta.1 ## [1.41.0-beta.1](https://github.com/LerianStudio/midaz/compare/v1.40.0...v1.41.0-beta.1) (2024-12-27) ### Bug Fixes * final :bug: ([e07f491](https://github.com/LerianStudio/midaz/commit/e07f4912b23046ab2b5ac0bfa8547117bd7f4598)) * formatted version in script install cli :bug: ([d418612](https://github.com/LerianStudio/midaz/commit/d41861296564f2a883f8bbf557169b81bc7e5841)) * name the step wait change update needs of the step from choco :bug: ([c7062e7](https://github.com/LerianStudio/midaz/commit/c7062e79c8b7fec4b39e0bf7fc0a1f8a84b146f0)) * runner to branch develop :bug: ([f1bd475](https://github.com/LerianStudio/midaz/commit/f1bd4756c86aff250e867d5c222d4245db7cd675)) * syntax error replace change to sed bash :bug: ([edbf9c5](https://github.com/LerianStudio/midaz/commit/edbf9c5ccf753f51499a7c0458e2d4a072c575a6)) * test if vars functionals normal :bug: ([be817c0](https://github.com/LerianStudio/midaz/commit/be817c0f95ad4f1f8a6cee1e13d2ccdd53427df1)) * wait 10 minutes before of the exec push to choco :bug: ([0a64bf8](https://github.com/LerianStudio/midaz/commit/0a64bf8d65b85c81a9f8efbc2b59107b17b19a6a)) --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 807a8ffe..83ddc753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## [1.41.0-beta.1](https://github.com/LerianStudio/midaz/compare/v1.40.0...v1.41.0-beta.1) (2024-12-27) + + +### Bug Fixes + +* final :bug: ([e07f491](https://github.com/LerianStudio/midaz/commit/e07f4912b23046ab2b5ac0bfa8547117bd7f4598)) +* formatted version in script install cli :bug: ([d418612](https://github.com/LerianStudio/midaz/commit/d41861296564f2a883f8bbf557169b81bc7e5841)) +* name the step wait change update needs of the step from choco :bug: ([c7062e7](https://github.com/LerianStudio/midaz/commit/c7062e79c8b7fec4b39e0bf7fc0a1f8a84b146f0)) +* runner to branch develop :bug: ([f1bd475](https://github.com/LerianStudio/midaz/commit/f1bd4756c86aff250e867d5c222d4245db7cd675)) +* syntax error replace change to sed bash :bug: ([edbf9c5](https://github.com/LerianStudio/midaz/commit/edbf9c5ccf753f51499a7c0458e2d4a072c575a6)) +* test if vars functionals normal :bug: ([be817c0](https://github.com/LerianStudio/midaz/commit/be817c0f95ad4f1f8a6cee1e13d2ccdd53427df1)) +* wait 10 minutes before of the exec push to choco :bug: ([0a64bf8](https://github.com/LerianStudio/midaz/commit/0a64bf8d65b85c81a9f8efbc2b59107b17b19a6a)) + ## [1.40.0](https://github.com/LerianStudio/midaz/compare/v1.39.0...v1.40.0) (2024-12-27) From f90ae7f51d27cf3cba309713d4d56bb31858e34e Mon Sep 17 00:00:00 2001 From: lerian-studio Date: Fri, 27 Dec 2024 16:44:53 +0000 Subject: [PATCH 10/11] chore(release): update version in .env.example to v1.41.0 --- chocolatey/tools/chocolateyinstall.ps1 | 2 +- components/audit/.env.example | 2 +- components/ledger/.env.example | 2 +- components/mdz/.env.example | 2 +- components/transaction/.env.example | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chocolatey/tools/chocolateyinstall.ps1 b/chocolatey/tools/chocolateyinstall.ps1 index a9c0aeb7..2244413f 100644 --- a/chocolatey/tools/chocolateyinstall.ps1 +++ b/chocolatey/tools/chocolateyinstall.ps1 @@ -1,4 +1,4 @@ -$version = 'v1.40.0' +$version = 'v1.41.0' $ErrorActionPreference = 'Stop'; diff --git a/components/audit/.env.example b/components/audit/.env.example index 820b69c1..035e6616 100644 --- a/components/audit/.env.example +++ b/components/audit/.env.example @@ -2,7 +2,7 @@ # ENV_NAME=production # APP -VERSION=v1.40.0 +VERSION=v1.41.0 SERVER_PORT=3005 SERVER_ADDRESS=:${SERVER_PORT} diff --git a/components/ledger/.env.example b/components/ledger/.env.example index c2b54498..3e2dad65 100644 --- a/components/ledger/.env.example +++ b/components/ledger/.env.example @@ -4,7 +4,7 @@ # ENV_NAME=production # APP -VERSION=v1.40.0 +VERSION=v1.41.0 SERVER_PORT=3000 SERVER_ADDRESS=:${SERVER_PORT} diff --git a/components/mdz/.env.example b/components/mdz/.env.example index ca7dc509..da55fc71 100644 --- a/components/mdz/.env.example +++ b/components/mdz/.env.example @@ -2,4 +2,4 @@ CLIENT_ID=9670e0ca55a29a466d31 CLIENT_SECRET=dd03f916cacf4a98c6a413d9c38ba102dce436a9 URL_API_AUTH=http://127.0.0.1:8080 URL_API_LEDGER=http://127.0.0.1:3000 -VERSION=v1.40.0 +VERSION=v1.41.0 diff --git a/components/transaction/.env.example b/components/transaction/.env.example index 5a0a6ebb..ff6913c0 100644 --- a/components/transaction/.env.example +++ b/components/transaction/.env.example @@ -4,7 +4,7 @@ # ENV_NAME=production # APP -VERSION=v1.40.0 +VERSION=v1.41.0 APP_CONTEXT=/transaction/v1 SERVER_PORT=3002 SERVER_ADDRESS=:${SERVER_PORT} From d4f69bc16a015c97e74fa756c47748c2bd8272cd Mon Sep 17 00:00:00 2001 From: lerian-studio Date: Fri, 27 Dec 2024 16:55:11 +0000 Subject: [PATCH 11/11] chore(release): 1.41.0-beta.2 ## [1.41.0-beta.2](https://github.com/LerianStudio/midaz/compare/v1.41.0-beta.1...v1.41.0-beta.2) (2024-12-27) ### Bug Fixes * wait no runner in develop :bug: ([07883ff](https://github.com/LerianStudio/midaz/commit/07883ff47c7ac29579c23ceb5ae4928cf9ccae86)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83ddc753..2492d1ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.41.0-beta.2](https://github.com/LerianStudio/midaz/compare/v1.41.0-beta.1...v1.41.0-beta.2) (2024-12-27) + + +### Bug Fixes + +* wait no runner in develop :bug: ([07883ff](https://github.com/LerianStudio/midaz/commit/07883ff47c7ac29579c23ceb5ae4928cf9ccae86)) + ## [1.41.0-beta.1](https://github.com/LerianStudio/midaz/compare/v1.40.0...v1.41.0-beta.1) (2024-12-27)