-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ahsanaman92/workflowsCIAndRelease
Create CI.yml
- Loading branch information
Showing
6 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.vs | ||
bin | ||
obj | ||
artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<!-- common NuGet package settings--> | ||
<PropertyGroup> | ||
<Authors>Michael Osthege;Ahsan Cheema</Authors> | ||
<PackageProjectUrl>https://github.com/ahsanaman92/JpegXmpWritePluginMDE</PackageProjectUrl> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/ahsanaman92/JpegXmpWritePluginMDE.git</RepositoryUrl> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<IncludeSource>true</IncludeSource> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
</PropertyGroup> | ||
|
||
<!-- common build properties --> | ||
<PropertyGroup> | ||
<VersionNumber Condition=" '$(Version)'=='' ">2.9.0</VersionNumber> | ||
<NuGetAudit>enable</NuGetAudit> | ||
<NuGetAuditMode>all</NuGetAuditMode> | ||
<UseArtifactsOutput>true</UseArtifactsOutput> | ||
<WarningLevel>5</WarningLevel> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters