Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 6 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +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

- 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
files: |
*.zip
*.tar.gz
3 changes: 0 additions & 3 deletions env.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
11 changes: 1 addition & 10 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down