Skip to content

Commit

Permalink
Merge pull request #439 from LerianStudio/develop
Browse files Browse the repository at this point in the history
merge: Develop to Main
  • Loading branch information
maxwelbm authored Dec 27, 2024
2 parents cf4635a + d4f69bc commit 187d5f4
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 32 deletions.
51 changes: 25 additions & 26 deletions .github/workflows/packages-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
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
Expand All @@ -29,20 +30,31 @@ jobs:
echo "is_main=false" >> $GITHUB_OUTPUT
fi
version=$(echo "$RAW_RELEASE" | sed 's/^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 10 minutes
run: sleep 600

# 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
# 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_release]
runs-on: windows-latest
if: needs.get_branch.outputs.is_main == 'true'
steps:
Expand All @@ -55,18 +67,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
Expand All @@ -83,9 +83,8 @@ jobs:
exit 1
}
$version = $env:version
Write-Host "Updating nuspec version to $version"
(Get-Content $nuspecPath) -replace '<version>.*</version>', "<version>$version</version>" | Set-Content $nuspecPath
Write-Host "Updating nuspec version to ${{ needs.get_branch.outputs.version }}"
(Get-Content $nuspecPath) -replace '<version>.*</version>', "<version>${{ needs.get_branch.outputs.version }}</version>" | Set-Content $nuspecPath
shell: pwsh

- name: Download and extract ZIP
Expand All @@ -95,7 +94,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
Expand Down Expand Up @@ -128,12 +127,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
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## [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)


### 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)


Expand Down
6 changes: 4 additions & 2 deletions chocolatey/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
$version = 'v1.40.0'
$version = 'v1.41.0'

$ErrorActionPreference = 'Stop';

$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/v${version}/midaz_${version}_windows_amd64.zip'
$url = "https://github.com/LerianStudio/midaz/releases/download/"+$version+"/midaz_"+$versionFmt+"_windows_amd64.zip"
$checksum = '{{CHECKSUM}}'
$silentArgs = ''

Expand Down
2 changes: 1 addition & 1 deletion components/audit/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ENV_NAME=production

# APP
VERSION=v1.40.0
VERSION=v1.41.0
SERVER_PORT=3005
SERVER_ADDRESS=:${SERVER_PORT}

Expand Down
2 changes: 1 addition & 1 deletion components/ledger/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ENV_NAME=production

# APP
VERSION=v1.40.0
VERSION=v1.41.0
SERVER_PORT=3000
SERVER_ADDRESS=:${SERVER_PORT}

Expand Down
2 changes: 1 addition & 1 deletion components/mdz/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion components/transaction/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 187d5f4

Please sign in to comment.