Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 16fbddcdc8 | |||
| ec3d8de187 |
@@ -19,20 +19,31 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Restore ReleaseUpdater
|
|
||||||
run: dotnet restore ReleaseUpdater
|
|
||||||
|
|
||||||
- name: Set version from tag
|
- name: Set version from tag
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
TAG="${GITHUB_REF_NAME#v}"
|
TAG="${GITHUB_REF_NAME#v}"
|
||||||
echo "PACKAGE_VERSION=$TAG" >> $GITHUB_OUTPUT
|
echo "PACKAGE_VERSION=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build ReleaseUpdater
|
- name: Replace ProjectReference with PackageReference
|
||||||
run: dotnet build ReleaseUpdater -c Release -p:Version=${{ steps.version.outputs.PACKAGE_VERSION }}
|
run: |
|
||||||
|
sed -i "s#<ProjectReference Include=\"..\/ReleaseUpdater.Common\/ReleaseUpdater.Common.csproj\" />#<PackageReference Include=\"ReleaseUpdater.Common\" Version=\"${{ steps.version.outputs.PACKAGE_VERSION }}\" />#" ReleaseUpdater/ReleaseUpdater.csproj
|
||||||
|
|
||||||
- name: Pack ReleaseUpdater
|
- name: Build and Pack projects
|
||||||
run: dotnet pack ReleaseUpdater -c Release --no-build -p:PackageVersion=${{ steps.version.outputs.PACKAGE_VERSION }} -o ./artifacts
|
run: |
|
||||||
|
mkdir -p artifacts
|
||||||
|
for proj in $PROJECTS; do
|
||||||
|
echo "Restoring $proj..."
|
||||||
|
dotnet restore $proj
|
||||||
|
echo "Building $proj..."
|
||||||
|
dotnet build $proj -c Release -p:Version=${{ steps.version.outputs.PACKAGE_VERSION }}
|
||||||
|
echo "Packing $proj..."
|
||||||
|
dotnet pack $proj -c Release --no-build -p:PackageVersion=${{ steps.version.outputs.PACKAGE_VERSION }} -o ./artifacts
|
||||||
|
done
|
||||||
|
env:
|
||||||
|
PROJECTS: |
|
||||||
|
ReleaseUpdater.Common
|
||||||
|
ReleaseUpdater
|
||||||
|
|
||||||
- name: Upload package artifact
|
- name: Upload package artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|||||||
@@ -11,7 +11,17 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\ReleaseUpdater.Common\ReleaseUpdater.Common.csproj" />
|
<ProjectReference Include="..\ReleaseUpdater.Common\ReleaseUpdater.Common.csproj"
|
||||||
|
PrivateAssets="none"
|
||||||
|
IncludeAssets="all"
|
||||||
|
/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="CopyProjectReferencesToPackage" AfterTargets="Pack">
|
||||||
|
<ItemGroup>
|
||||||
|
<BuildOutputInPackage Include="$(OutputPath)ReleaseUpdater.Common.dll"
|
||||||
|
TargetPath="lib\net8.0\ReleaseUpdater.Common.dll" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user