ci(release): switch windows release steps from bash to powershell
Some checks failed
Desktop CI / tests (push) Successful in 13s
Desktop Release / release (push) Failing after 1m14s

This commit is contained in:
2026-02-15 17:28:29 +03:00
parent c8da0f9191
commit e8930f7550

View File

@@ -33,66 +33,70 @@ jobs:
}
- name: Install dependencies
shell: bash
shell: powershell
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt pyinstaller
- name: Extract app version
id: extract_version
shell: bash
shell: powershell
run: |
VERSION=$(python -c "from app_version import APP_VERSION; print(APP_VERSION)")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Detected version: $VERSION"
$version = python -c "from app_version import APP_VERSION; print(APP_VERSION)"
"version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
Write-Host "Detected version: $version"
- name: Stop if version already released
id: stop
shell: bash
shell: powershell
run: |
VERSION="${{ steps.extract_version.outputs.version }}"
if git show-ref --tags --quiet --verify "refs/tags/$VERSION"; then
echo "Version $VERSION already released, stopping job."
echo "CONTINUE=false" >> "$GITHUB_ENV"
else
echo "Version $VERSION not released yet, continuing workflow..."
echo "CONTINUE=true" >> "$GITHUB_ENV"
fi
$version = "${{ steps.extract_version.outputs.version }}"
git show-ref --tags --quiet --verify "refs/tags/$version"
if ($LASTEXITCODE -eq 0) {
Write-Host "Version $version already released, stopping job."
"CONTINUE=false" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} else {
Write-Host "Version $version not released yet, continuing workflow..."
"CONTINUE=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}
- name: Run tests
if: env.CONTINUE == 'true'
shell: bash
shell: powershell
run: |
python -m py_compile app_version.py main.py build.py tests/test_auth_relogin_smoke.py
python -m unittest tests/test_auth_relogin_smoke.py
- name: Build release zip
if: env.CONTINUE == 'true'
shell: bash
shell: powershell
run: |
python build.py
- name: Ensure archive exists
if: env.CONTINUE == 'true'
shell: bash
shell: powershell
run: |
VERSION="${{ steps.extract_version.outputs.version }}"
test -f "dist/AnabasisManager-$VERSION.zip"
$version = "${{ steps.extract_version.outputs.version }}"
$archivePath = "dist/AnabasisManager-$version.zip"
if (-not (Test-Path $archivePath)) {
throw "Archive not found: $archivePath"
}
- name: Configure git identity
if: env.CONTINUE == 'true'
shell: bash
shell: powershell
run: |
git config user.name "gitea-actions"
git config user.email "gitea-actions@daemonlord.ru"
- name: Create git tag
if: env.CONTINUE == 'true'
shell: bash
shell: powershell
run: |
VERSION="${{ steps.extract_version.outputs.version }}"
git tag "$VERSION"
git push origin "$VERSION"
$version = "${{ steps.extract_version.outputs.version }}"
git tag "$version"
git push origin "$version"
- name: Create Gitea Release
if: env.CONTINUE == 'true'