-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (44 loc) · 1.69 KB
/
deploy.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
name: Deploy
on:
workflow_dispatch:
inputs:
release_version:
description: 'Release version'
required: true
jobs:
deploy:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x' # Adjust the .NET version as needed
- name: Publish .NET Core app
run: dotnet publish BuildMpvUpscale2xAnimeJaNai/BuildMpvUpscale2xAnimeJaNai.csproj -c Release -o publish
- name: Run the console app
run: ./publish/BuildMpvUpscale2xAnimeJaNai.exe
- name: Install 7zip
run: choco install 7zip -y
- name: Create 7zip archive of the artifact
run: 7z a -t7z -mx=9 mpv-upscale-2x_animejanai-full-package-${{ github.event.inputs.release_version }}.7z ./publish/mpv-upscale-2x_animejanai-v3
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.release_version }}
release_name: Release ${{ github.event.inputs.release_version }}
draft: true
prerelease: true
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./mpv-upscale-2x_animejanai-full-package-${{ github.event.inputs.release_version }}.7z
asset_name: mpv-upscale-2x_animejanai-full-package-${{ github.event.inputs.release_version }}.7z
asset_content_type: application/x-7z-compressed