7
7
8
8
jobs :
9
9
build :
10
- runs-on : windows-latest
10
+ runs-on : ubuntu-latest # Can also use windows-latest, if needed
11
11
12
12
name : Shoko Desktop daily build
13
- env :
14
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
15
13
16
14
steps :
17
- - uses : actions/checkout@master
15
+ - uses : actions/checkout@v2
18
16
with :
19
17
submodules : recursive
20
18
@@ -30,32 +28,15 @@ jobs:
30
28
- name : Build
31
29
run : msbuild Shoko.Desktop.sln /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile
32
30
33
- - name : Upload Artifact
34
- uses : actions/upload-artifact@v4.4.0
35
- with :
36
- name : ShokoDesktop
37
- path : Shoko.Desktop\bin\Release
38
-
39
31
- name : Archive Release
40
- shell : pwsh
41
- run : Compress-Archive .\\Shoko.Desktop\\bin\\Release .\\ShokoDesktop.zip
32
+ run : zip -r ShokoDesktop.zip Shoko.Desktop/bin/Release
42
33
43
- - name : Upload Daily to shokoanime.com via SFTP
44
- shell : pwsh
34
+ - name : Upload Daily Build to FTPS Server
45
35
env :
46
36
FTP_USERNAME : ${{ secrets.FTP_USERNAME }}
47
37
FTP_PASSWORD : ${{ secrets.FTP_PASSWORD }}
48
- FTP_SERVER : ${{ secrets.FTP_SERVER }}
38
+ FTP_SERVER : ${{ secrets.FTP_SERVER }} # The server IP or domain
49
39
run : |
50
- # Create the SFTP command script as a string
51
- $sftpCommands = @"
52
- put .\\ShokoDesktop.zip /files/shoko-desktop/daily/ShokoDesktop.zip
53
- bye
54
- "@
55
-
56
- # Write the commands to a temporary file
57
- $sftpScriptPath = "$env:TEMP\\sftp_commands.txt"
58
- $sftpCommands | Out-File -FilePath $sftpScriptPath -Encoding ASCII
59
-
60
- # Execute the SFTP command with the temporary script
61
- sftp -o StrictHostKeyChecking=no -b $sftpScriptPath $env:FTP_USERNAME@$env:FTP_SERVER
40
+ curl --ftp-ssl -T ShokoDesktop.zip \
41
+ --user ${{ secrets.FTP_USERNAME }}:${{ secrets.FTP_PASSWORD }} \
42
+ ftps://${{ secrets.FTP_SERVER }}/files/shoko-desktop/daily/ShokoDesktop.zip --insecure
0 commit comments