From a3bf1937ac2a72df1769dd1c4ce74595efda4799 Mon Sep 17 00:00:00 2001 From: Mikko Uuksulainen Date: Tue, 10 Jan 2023 19:20:35 +0000 Subject: [PATCH] Add CI/CD --- .github/workflows/CI.yml | 50 +++++++++++++++++++ CHANGELOG.MD | 3 ++ .../RPGMakerDecrypter.Cli.csproj | 1 + .../RPGMakerDecrypter.Gui.csproj | 1 + 4 files changed, 55 insertions(+) create mode 100644 .github/workflows/CI.yml create mode 100755 CHANGELOG.MD diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..a4fd6b0 --- /dev/null +++ b/.github/workflows/CI.yml @@ -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/setup-nuget@v1.0.5 + + - 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/release-action@v1.12.0 + 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" diff --git a/CHANGELOG.MD b/CHANGELOG.MD new file mode 100755 index 0000000..cf4db4c --- /dev/null +++ b/CHANGELOG.MD @@ -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. \ No newline at end of file diff --git a/RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj b/RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj index 4731873..5b1b56c 100644 --- a/RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj +++ b/RPGMakerDecrypter.Cli/RPGMakerDecrypter.Cli.csproj @@ -4,6 +4,7 @@ Exe RPGMakerDecrypter-cli true + true icon_256x256_cli.ico diff --git a/RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj b/RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj index d655c01..f54f77d 100644 --- a/RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj +++ b/RPGMakerDecrypter.Gui/RPGMakerDecrypter.Gui.csproj @@ -6,6 +6,7 @@ true true true + true icon_256x256.ico