Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
the-database committed Jul 25, 2024
1 parent 40ada8f commit fb3138e
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy

on:
workflow_dispatch:
inputs:
release_version:
description: 'Release version'
required: true

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
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: sudo apt-get install -y p7zip-full

- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/BuildMpvUpscale2xAnimeJaNai/bin
/BuildMpvUpscale2xAnimeJaNai/obj
/BuildMpvUpscale2xAnimeJaNai/.vs
/publish

0 comments on commit fb3138e

Please sign in to comment.