From af27b3e99b4513f0eaf9cdb10dea5f5e7620b798 Mon Sep 17 00:00:00 2001 From: Ahsan Aman <64293515+ahsanaman92@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:54:36 -0400 Subject: [PATCH 1/5] Create CI.yml --- .github/workflows/CI.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..07095d5 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,30 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: windows-latest + env: + DOTNET_NOLOGO: true + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore JpegXmpWritePluginMDE.sln + - name: Build + run: dotnet build JpegXmpWritePluginMDE.sln --configuration Release + - name: Test net8.0 + run: dotnet test --verbosity normal --configuration Release --no-build -f net8.0 JpegXmpWritePluginMDE.Tests\JpegXmpWritePluginMDE.Tests.csproj From ebd5fc0ec22843dcb36df821674227a1e61054ca Mon Sep 17 00:00:00 2001 From: Ahsan Aman <64293515+ahsanaman92@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:31:17 -0400 Subject: [PATCH 2/5] Create prerelease.yml --- .github/workflows/prerelease.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/prerelease.yml diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml new file mode 100644 index 0000000..f35d2fe --- /dev/null +++ b/.github/workflows/prerelease.yml @@ -0,0 +1,20 @@ +name: prerelease +on: + release: + types: [prereleased] + +jobs: + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Get version from release + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT" + shell: bash + - run: echo ${{ steps.get_version.outputs.VERSION }} + - run: dotnet pack JpegXmpWritePluginMDE/JpegXmpWritePluginMDE.csproj -o . -c Release /p:Version=${{ steps.get_version.outputs.VERSION }} + - run: dotnet nuget push *.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + env: + NUGET_API_KEY: ${{ secrets.NuGetAPIKey }} + shell: bash From 66bdfd74a2d6a6ac25299f8fb404fcc1b2d6fa49 Mon Sep 17 00:00:00 2001 From: Ahsan Aman <64293515+ahsanaman92@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:34:21 -0400 Subject: [PATCH 3/5] Create release.yml --- .github/workflows/release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cef579e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: release +on: + release: + types: [published] + +jobs: + windows: + runs-on: windows-latest + if: "!github.event.release.prerelease" + steps: + - uses: actions/checkout@v4 + - name: Get version from release + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT" + shell: bash + - run: echo ${{ steps.get_version.outputs.VERSION }} + - run: dotnet pack JpegXmpWritePluginMDE/JpegXmpWritePluginMDE.csproj -o . -c Release /p:Version=${{ steps.get_version.outputs.VERSION }} + - run: dotnet nuget push *.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + env: + NUGET_API_KEY: ${{ secrets.NuGetAPIKey }} + shell: bash From c6f74f638fd05deeaeb4f497d835549dd592dd4f Mon Sep 17 00:00:00 2001 From: Ahsan Cheema Date: Wed, 20 Mar 2024 14:39:10 -0400 Subject: [PATCH 4/5] Updates for nuget package --- .gitignore | 1 + Directory.Build.props | 26 +++++++++++++++++++ .../JpegXmpWritePluginMDE.csproj | 13 +++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Directory.Build.props diff --git a/.gitignore b/.gitignore index e3a6880..ddb1d49 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .vs bin obj +artifacts diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..03f03c1 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,26 @@ + + + + + + Michael Osthege;Ahsan Cheema + https://github.com/ahsanaman92/JpegXmpWritePluginMDE + Apache-2.0 + git + https://github.com/drewnoakes/JpegXmpWritePluginMDE.git + true + true + true + true + + + + + 2.9.0 + enable + all + true + 5 + + + \ No newline at end of file diff --git a/JpegXmpWritePluginMDE/JpegXmpWritePluginMDE.csproj b/JpegXmpWritePluginMDE/JpegXmpWritePluginMDE.csproj index 60cd55c..143a3d5 100644 --- a/JpegXmpWritePluginMDE/JpegXmpWritePluginMDE.csproj +++ b/JpegXmpWritePluginMDE/JpegXmpWritePluginMDE.csproj @@ -1,11 +1,22 @@ - + + + Plugin to metadata-extractor-dotnet (MDE) for writing XMP data to .jpg/.jpeg files + Jpg XMP Write Plugin for MDE + XMP;Metadata;Writer;DotNet + $(VersionNumber) + true + Library net6.0;net8.0 enable enable + README.md + + + From c5c662b6b54b3eca7096e846aac6fd668a290bc9 Mon Sep 17 00:00:00 2001 From: Ahsan Cheema Date: Wed, 20 Mar 2024 14:40:49 -0400 Subject: [PATCH 5/5] correct url --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 03f03c1..f4ce73d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ https://github.com/ahsanaman92/JpegXmpWritePluginMDE Apache-2.0 git - https://github.com/drewnoakes/JpegXmpWritePluginMDE.git + https://github.com/ahsanaman92/JpegXmpWritePluginMDE.git true true true