SmartLockerTools/.gitea/workflows/build_windows.yaml
amass a57dc9a11b
Some checks failed
Build Applications / PullDocker (push) Successful in 4s
Windows CI / build (push) Failing after 4s
Build Applications / Build (push) Failing after 9s
fix ci.
2024-10-16 00:37:45 +08:00

29 lines
1.2 KiB
YAML

name: Windows CI
on: [push]
jobs:
build:
runs-on: [windows11]
steps:
- name: Set up SSH
run: |
if (-Not (Test-Path -Path C:\Windows\system32\config\systemprofile\.ssh)) {
mkdir C:\Windows\system32\config\systemprofile\.ssh
}
echo $env:SSH_PRIVATE_KEY | Out-File -FilePath C:\Windows\system32\config\systemprofile\.ssh\id_ed25519 -Encoding ascii
ssh-keyscan -t ed25519 -p 22022 frp-by1.wwvvww.cn | Out-File -FilePath C:\Windows\system32\config\systemprofile\.ssh\known_hosts -Encoding ascii
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Clone repository
run: |
$branch = "${{ github.ref }}" -replace '^refs/heads/', ''
Write-Host "git clone --depth 1 --branch=$branch ssh://git@frp-by1.wwvvww.cn:22022/${{ env.GITEA_REPOSITORY }}.git"
git clone --depth 1 --branch=$branch ssh://git@frp-by1.wwvvww.cn:22022/${{ env.GITEA_REPOSITORY }}.git .
git checkout ${{ github.sha }}
env:
GITEA_REPOSITORY: ${{ gitea.repository }}
- name: Build and deploy
run: |
resources/build.ps1 build
resources/build.ps1 deploy
resources/build.ps1 changelog