From 34473a63ddab33c3ff24178a8b54d0dbbbe6e46b Mon Sep 17 00:00:00 2001
From: romfir <33402460+romfir@users.noreply.github.com>
Date: Fri, 8 Sep 2023 01:41:43 +0200
Subject: [PATCH] Create build.yml
---
.github/workflows/build.yml | 71 +++++++++++++++++++
OpenApiLINQPadDriver/ConnectionDialog.xaml | 2 +-
.../OpenApiLINQPadDriver.csproj | 14 ++--
3 files changed, 80 insertions(+), 7 deletions(-)
create mode 100644 .github/workflows/build.yml
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..8db974d
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,71 @@
+name: Build
+
+on:
+ workflow_dispatch:
+ push:
+ pull_request:
+ release:
+ types:
+ - published
+
+env:
+ PACKAGE_NAME: OpenApiLINQPadDriver
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
+ DOTNET_NOLOGO: 1
+ SLN: OpenApiLINQPadDriver.sln
+ CONFIGURATION: Release
+ RETENTION_DAYS: 1
+ NUGET_DIRECTORY: ${{ github.workspace }}/nuget
+
+jobs:
+ build:
+ runs-on: windows-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: |
+ 6.x.x
+ 7.x.x
+
+ - name: Restore dependencies
+ run: dotnet restore ${{ env.SLN }}
+
+ - name: ${{ env.SLN }} ${{ env.CONFIGURATION }} Build
+ run: dotnet build ${{ env.SLN }} --no-restore --configuration ${{ env.CONFIGURATION }} -p:GITHUB_ACTIONS=true
+
+ - name: Publish Artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ env.PACKAGE_NAME }}
+ if-no-files-found: error
+ path: |
+ ${{ env.PACKAGE_NAME }}/bin/${{ env.CONFIGURATION }}/${{ env.PACKAGE_NAME }}.*.*nupkg
+ retention-days: ${{ env.RETENTION_DAYS }}
+
+ deploy:
+ if: github.event_name == 'release'
+ runs-on: windows-latest
+ needs: [ build ]
+ steps:
+ - uses: actions/download-artifact@v3
+ with:
+ name: ${{ env.PACKAGE_NAME }}
+ path: ${{ env.NUGET_DIRECTORY }}
+
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: |
+ 6.x.x
+ 7.x.x
+
+ - name: Publish NuGet package
+ run: |
+ foreach($file in (Get-ChildItem "${{ env.NUGET_DIRECTORY }}" -Recurse -Include ${{ env.PACKAGE_NAME }}.*nupkg)) {
+ dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
+ }
\ No newline at end of file
diff --git a/OpenApiLINQPadDriver/ConnectionDialog.xaml b/OpenApiLINQPadDriver/ConnectionDialog.xaml
index e00b008..bef4e1e 100644
--- a/OpenApiLINQPadDriver/ConnectionDialog.xaml
+++ b/OpenApiLINQPadDriver/ConnectionDialog.xaml
@@ -8,7 +8,7 @@
x:ClassModifier="internal"
mc:Ignorable="d"
Title="Open API Connection"
- Icon="/OpenApiContextDriver;component/openapi.ico"
+ Icon="/OpenApiLINQPadDriver;component/openapi.ico"
Background="{x:Static SystemColors.ControlBrush}"
Width="660"
Height="310"
diff --git a/OpenApiLINQPadDriver/OpenApiLINQPadDriver.csproj b/OpenApiLINQPadDriver/OpenApiLINQPadDriver.csproj
index ed4a10b..77e131c 100644
--- a/OpenApiLINQPadDriver/OpenApiLINQPadDriver.csproj
+++ b/OpenApiLINQPadDriver/OpenApiLINQPadDriver.csproj
@@ -10,8 +10,8 @@
- OpenApiContextDriver
- 0.0.1
+ OpenApiLINQPadDriver
+ 0.0.1-alpha
true
Damian Romanowski (romfir22@gmail.com)
Copyright © Damian Romanowski 2023-$([System.DateTime]::Now.Year)
@@ -25,9 +25,9 @@
true
git
linqpaddriver swagger openapi
- https://github.com/i2van/CsvLINQPadDriver
+ https://github.com/romfir/OpenApiLINQPadDriver
MIT
- https://github.com/i2van/CsvLINQPadDriver
+ https://github.com/romfir/OpenApiLINQPadDriver
NuGetIcon.png
README.md
@@ -36,11 +36,13 @@
true
true
snupkg
+ true
+ true