Skip to content

Commit

Permalink
Add CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
uuksu committed Jan 10, 2023
1 parent 2703095 commit a3bf193
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: .NET

on:
push:
tags:
- v*

jobs:
build_cli:

env:
BUILD_CONFIG: 'Release'
CLI_PROJECT: 'RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj'
GUI_PROJECT: 'RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Fetch tags
run: git fetch --all --tags

- name: Setup NuGet
uses: NuGet/[email protected]

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration $BUILD_CONFIG --no-restore

- name: Publish Linux CLI
run: dotnet publish $CLI_PROJECT -r linux-x64 -p:PublishSingleFile=true --self-contained true

- name: Publish Windows CLI
run: dotnet publish $CLI_PROJECT -r win-x64 -p:PublishSingleFile=true --self-contained true

- name: Publish Windows GUI
run: dotnet publish $GUI_PROJECT -r win-x64 -p:PublishSingleFile=true --self-contained true

- uses: ncipollo/[email protected]
with:
bodyFile: CHANGELOG.MD
artifacts: "/home/runner/**/linux-x64/**/RPGMakerDecrypter-cli,/home/runner/**/win-x64/**/RPGMakerDecrypter-cli.exe,/home/runner/**/win-x64/**/RPGMakerDecrypter-gui.exe"
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changed in this release

* **Upgrade to .NET 6.0**: Upgrade from old .NET Framework to modern .NET 6.0. CLI is now cross-platform so it works for example in Linux and Mac OS.
1 change: 1 addition & 0 deletions RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<OutputType>Exe</OutputType>
<AssemblyName>RPGMakerDecrypter-cli</AssemblyName>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon_256x256_cli.ico</ApplicationIcon>
Expand Down
1 change: 1 addition & 0 deletions RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon_256x256.ico</ApplicationIcon>
Expand Down

0 comments on commit a3bf193

Please sign in to comment.