Skip to content

Commit 1bdae0d

Browse files
Update daily.yml
1 parent 969b231 commit 1bdae0d

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

.github/workflows/daily.yml

+8-27
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ on:
77

88
jobs:
99
build:
10-
runs-on: windows-latest
10+
runs-on: ubuntu-latest # Can also use windows-latest, if needed
1111

1212
name: Shoko Desktop daily build
13-
env:
14-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
1513

1614
steps:
17-
- uses: actions/checkout@master
15+
- uses: actions/checkout@v2
1816
with:
1917
submodules: recursive
2018

@@ -30,32 +28,15 @@ jobs:
3028
- name: Build
3129
run: msbuild Shoko.Desktop.sln /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile
3230

33-
- name: Upload Artifact
34-
uses: actions/upload-artifact@v4.4.0
35-
with:
36-
name: ShokoDesktop
37-
path: Shoko.Desktop\bin\Release
38-
3931
- 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
4233

43-
- name: Upload Daily to shokoanime.com via SFTP
44-
shell: pwsh
34+
- name: Upload Daily Build to FTPS Server
4535
env:
4636
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
4737
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
48-
FTP_SERVER: ${{ secrets.FTP_SERVER }}
38+
FTP_SERVER: ${{ secrets.FTP_SERVER }} # The server IP or domain
4939
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

Comments
 (0)