From e0c6ec4e35c9bba8bba073ade5fcac1747a5c072 Mon Sep 17 00:00:00 2001 From: avandras Date: Thu, 6 Mar 2025 15:41:48 +0100 Subject: [PATCH 1/3] Use plain psycopg instead of binary --- make.ps1 | 2 +- src/install.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/make.ps1 b/make.ps1 index b5dcaed..d8a5dfc 100644 --- a/make.ps1 +++ b/make.ps1 @@ -102,7 +102,7 @@ function Get-PatroniPackages { Write-Host "`n--- Download PATRONI packages ---" -ForegroundColor blue Set-Location "$MD\patroni" & $PIP download -r requirements.txt -d .patroni-packages - & $PIP download pip pip_install setuptools wheel cdiff psycopg-binary -d .patroni-packages + & $PIP download pip pip_install setuptools wheel cdiff psycopg -d .patroni-packages Set-Location -Path "..\.." Write-Host "`n--- PATRONI packages downloaded ---" -ForegroundColor green } diff --git a/src/install.ps1 b/src/install.ps1 index e1c32b3..cdd04d9 100644 --- a/src/install.ps1 +++ b/src/install.ps1 @@ -21,7 +21,7 @@ Write-Host "--- Python runtime installed ---`n" -ForegroundColor green Write-Host "--- Installing Patroni packages ---" -ForegroundColor blue pip3.exe install --no-index --find-links .patroni-packages -r requirements.txt -pip3.exe install --no-index --find-links .patroni-packages psycopg-binary +pip3.exe install --no-index --find-links .patroni-packages psycopg pip3.exe install --no-index --find-links .patroni-packages cdiff Set-Location '..' Write-Host "--- Patroni packages installed ---`n" -ForegroundColor green From 190dbe866be9b4a63ae059c2fd164eb5ea057351 Mon Sep 17 00:00:00 2001 From: avandras Date: Thu, 6 Mar 2025 15:50:53 +0100 Subject: [PATCH 2/3] Do not create the GUI installer anymore --- .github/workflows/release.yml | 11 ----------- env.ps1 | 3 --- make.ps1 | 9 --------- 3 files changed, 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef72544..03c6073 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,14 +43,3 @@ jobs: asset_path: ./PES.zip asset_name: PES.zip asset_content_type: application/zip - - - name: Upload Release Asset (exe) - id: upload-release-asset-exe - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./Patroni-Env-Setup.exe - asset_name: Patroni-Env-Setup.exe - asset_content_type: application/vnd.microsoft.portable-executable \ No newline at end of file diff --git a/env.ps1 b/env.ps1 index 4a6600c..e4d2c92 100644 --- a/env.ps1 +++ b/env.ps1 @@ -11,6 +11,3 @@ $PYTHON_REF = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-amd64.exe" $SEVENZIP = "C:\Program Files\7-Zip\7z.exe" -$INNOTOOL = "C:\Program Files (x86)\Inno Setup 6" -$ISCC = Join-Path $INNOTOOL "iscc.exe" -$ISSFile = "installer\patroni.iss" diff --git a/make.ps1 b/make.ps1 index d8a5dfc..d520f70 100644 --- a/make.ps1 +++ b/make.ps1 @@ -119,15 +119,6 @@ function Get-WinSW { } function Export-Assets { - Write-Host "`n--- Creating windows installer ---" -ForegroundColor blue - if (-Not (Test-Path $INNOTOOL)) { - Write-Host "$INNOTOOL does not exist" -ForegroundColor Red - Write-Host "Please install Innotool and set the INNOTOOL environment variable." -ForegroundColor Red - exit 1 - } - & $ISCC $ISSFile - Write-Host "`n--- Installer generated successfully ---" -ForegroundColor green - Write-Host "`n--- Prepare archive ---" -ForegroundColor blue Compress-ToZipFile "$MD" "$MD.zip" Write-Host "`n--- Archive compressed ---" -ForegroundColor green From 3c3abb7c4406ded03b7f2052a79a5280297f41f4 Mon Sep 17 00:00:00 2001 From: avandras Date: Thu, 6 Mar 2025 16:10:07 +0100 Subject: [PATCH 3/3] Simplify and modernize releasing --- .github/workflows/release.yml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03c6073..21c5d33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,29 +17,14 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Build project # This would actually build your project, using zip for an example artifact + - name: Build project shell: pwsh run: | .\make.ps1 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Release Artifacts + uses: softprops/action-gh-release@v2 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - - name: Upload Release Asset (zip) - id: upload-release-asset-zip - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./PES.zip - asset_name: PES.zip - asset_content_type: application/zip + files: | + *.zip + *.tar.gz