feat(ci): add ci (and other changes)

This commit is contained in:
rjindael 2023-07-27 23:43:30 -07:00
parent 4970a15d00
commit c74e200843
No known key found for this signature in database
GPG Key ID: D069369C906CCF31
4 changed files with 48 additions and 19 deletions

46
.github/builds/ci.yml vendored Normal file
View File

@ -0,0 +1,46 @@
name: CI
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0
- name: Build
run: |
dotnet publish -r win-x64 -c Release --no-self-contained -p:PublishDir=../publish/win-x64
mv publish/win-x64/Kiseki.Launcher.Windows.exe publish/win-x64/Kiseki.Launcher.exe
mv publish/win-x64/Kiseki.Launcher.Windows.pdb publish/win-x64/Kiseki.Launcher.pdb
- name: Upload
uses: actions/upload-artifact@v3
with:
name: win-x64
path: publish/win-x64/*
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tag/v')
steps:
- name: Download release artifacts
uses: actions/download-artifact@v3
with:
path: x64
- name: Rename artifacts
run: mv x64/win-x64.zip Kiseki.Launcher-v${{ github.ref_name }}_win-x64.zip
- name: Create release draft
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
files: Kiseki.Launcher-v${{ github.ref_name }}_win-x64.zip
draft: true

2
.gitignore vendored
View File

@ -189,7 +189,7 @@ publish/
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
# *.pubxml
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to

View File

@ -4,6 +4,7 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<PublishSingleFile>true</PublishSingleFile>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>Resources\IconKiseki.ico</ApplicationIcon>
<ImplicitUsings>enable</ImplicitUsings>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>..\build\win-x64\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net6.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>
</PropertyGroup>
</Project>