CI: Package Interfaces as nuget package
Some checks failed
release-nuget-package / Release NuGet Package (push) Failing after 27s
Some checks failed
release-nuget-package / Release NuGet Package (push) Failing after 27s
This commit is contained in:
31
.gitea/workflows/release-nuget-package.yml
Normal file
31
.gitea/workflows/release-nuget-package.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: release-nuget-package
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Release NuGet Package
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Git clone"
|
||||||
|
run: git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
||||||
|
- name: "Git checkout"
|
||||||
|
run: git checkout "${{ gitea.sha }}"
|
||||||
|
- name: "Dotnet SDK einrichten"
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: "10.0.x"
|
||||||
|
- name: "Get configured dotnet sources"
|
||||||
|
run: dotnet nuget list sources
|
||||||
|
- name: "Build Interfaces Project"
|
||||||
|
run: dotnet build -c PublishNuget ./Interfaces/Interfaces.csproj
|
||||||
|
- name: "Release to Package Registry"
|
||||||
|
run: dotnet nuget push --source gitea --api-key ${{ secrets.REGISTRY_TOKEN_KOCODER }} ./Interfaces/Interfaces.*.nupkg
|
||||||
|
- name: "Create release"
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
./alumnihub.deb
|
||||||
|
./alumnihub/opt/alumnihub/Packages/*.nupkg
|
||||||
@@ -11,5 +11,6 @@
|
|||||||
<Exec Condition="'$(OS)' != 'Windows_NT' And '$(Configuration)' == 'Debug'" Command="bash $(ProjectDir)debug.sh $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
<Exec Condition="'$(OS)' != 'Windows_NT' And '$(Configuration)' == 'Debug'" Command="bash $(ProjectDir)debug.sh $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
||||||
<Exec Condition="'$(OS)' == 'Windows_NT' And '$(Configuration)' == 'Release'" Command="release.cmd $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
<Exec Condition="'$(OS)' == 'Windows_NT' And '$(Configuration)' == 'Release'" Command="release.cmd $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
||||||
<Exec Condition="'$(OS)' != 'Windows_NT' And '$(Configuration)' == 'Release'" Command="bash $(ProjectDir)release.sh $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
<Exec Condition="'$(OS)' != 'Windows_NT' And '$(Configuration)' == 'Release'" Command="bash $(ProjectDir)release.sh $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
||||||
|
<Exec Condition="'$(OS)' != 'Windows_NT' And '$(Configuration)' == 'PublishNuget'" Command="bash $(ProjectDir)release.sh $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package','')) skip-copy-to-oqtane.framework" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
TargetFramework=$1
|
TargetFramework=$1
|
||||||
ProjectName=$2
|
ProjectName=$2
|
||||||
|
|
||||||
find . -name *.nupkg -delete
|
find . -name *.nupkg -delete
|
||||||
dotnet pack $ProjectName.nuspec "/p:targetframework=${TargetFramework};ProjectName=${ProjectName}"
|
dotnet pack $ProjectName.nuspec "/p:targetframework=${TargetFramework};ProjectName=${ProjectName}"
|
||||||
|
|
||||||
|
if [ "$#" -ne 3 ]; then
|
||||||
|
echo "Skipping copy to Oqtane.Server/Packages"
|
||||||
|
else
|
||||||
cp -f *.nupkg ../../oqtane.framework/Oqtane.Server/Packages/
|
cp -f *.nupkg ../../oqtane.framework/Oqtane.Server/Packages/
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user