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