-
Notifications
You must be signed in to change notification settings - Fork 74
73 lines (61 loc) · 2.4 KB
/
tray-standalone-manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build Tray Service - Standalone (Manual)
on:
workflow_dispatch:
inputs:
ref:
description: Git reference for what to push
default: master
required: true
filename:
description: Name of the file to upload to shokoanime.com
default: ShokoServer.zip
required: true
release:
description: Release Channel
default: dev
required: true
jobs:
tray-service-standalone-manual:
runs-on: windows-latest
strategy:
matrix:
dotnet: [ '8.x' ]
name: Shoko Tray Service build
steps:
- name: Checkout branch
uses: actions/checkout@master
with:
ref: "${{ github.event.inputs.ref }}"
submodules: recursive
fetch-depth: 0 # This is set to download the full git history for the repo
- name: Replace Sentry DSN and other keys
shell: pwsh
run: |
.\\.github\\workflows\\ReplaceSentryDSN.ps1 -dsn ${{ secrets.SENTRY_DSN }}
.\\.github\\workflows\\ReplaceAVD3URL.ps1 -url ${{ secrets.AVD3_URL }}
- name: Get release info
id: release_info
uses: revam/gh-action-get-tag-and-version@v1
with:
tag: "${{ github.event.inputs.ref }}"
prefix: v
prefixRegex: "[vV]?"
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}
- run: dotnet publish -c Release -r win-x64 --self-contained true -f net8.0-windows Shoko.TrayService /p:Version="${{ steps.release_info.outputs.version }}" /p:InformationalVersion="channel=${{ github.event.inputs.release }}%2ccommit=${{ github.sha }}%2cdate=${{ steps.release_info.outputs.date }}%2c" # %2c is comma, blame windows/pwsh
- uses: actions/upload-artifact@v3
with:
name: Shoko.TrayService
path: Shoko.Server/bin/Release/net8.0-windows/win-x64/publish/
- name: Archive Release
shell: pwsh
run: Compress-Archive .\\Shoko.Server\\bin\\Release\\net8.0-windows\\win-x64\\publish .\\ShokoServer.zip
- name: Upload Daily to shokoanime.com
shell: pwsh
env:
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
FTP_SERVER: ${{ secrets.FTP_SERVER }}
run : .\\.github\\workflows\\UploadArchive.ps1 -filename "${{ github.event.inputs.filename }}"