mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-12-01 20:44:14 +01:00
Create Release Artifacts (#1527)
This commit is contained in:
1 parent
69ea61e42c
commit
f0965e5650
2 files changed
+68
-28
No files matched your search
@@ -4,6 +4,7 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "*.*.*"
|
- "*.*.*"
|
||||||
@@ -15,7 +16,46 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .NET 8
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
- name: Publish Standalone Binaries
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p ./artifacts
|
||||||
|
RIDS=("win-x64" "win-arm64" "linux-x64" "linux-arm64" "osx-x64" "osx-arm64")
|
||||||
|
|
||||||
|
for RID in "${RIDS[@]}"; do
|
||||||
|
echo "Publishing for $RID..."
|
||||||
|
dotnet publish ./src/dotnet-WireMock.Net/dotnet-WireMock.csproj \
|
||||||
|
-c Release \
|
||||||
|
-r "$RID" \
|
||||||
|
--self-contained true \
|
||||||
|
-p:PublishSingleFile=true \
|
||||||
|
-p:IncludeNativeLibrariesForSelfExtract=true \
|
||||||
|
-p:PublishDocumentationFile=false \
|
||||||
|
-p:DebugType=None \
|
||||||
|
-p:DebugSymbols=false \
|
||||||
|
-o "./publish/$RID"
|
||||||
|
|
||||||
|
if [[ "$RID" == win-* ]]; then
|
||||||
|
(cd "./publish/$RID" && zip "../../artifacts/wiremock-net-$RID.zip" dotnet-WireMock.exe)
|
||||||
|
else
|
||||||
|
tar -czvf "./artifacts/wiremock-net-$RID.tar.gz" -C "./publish/$RID" dotnet-WireMock
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Upload Standalone Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: wiremock-standalone
|
||||||
|
path: ./artifacts/*
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
files: ./artifacts/*
|
||||||
@@ -1,27 +1,27 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<PackAsTool>true</PackAsTool>
|
<PackAsTool Condition="'$(PublishSingleFile)' != 'true'">true</PackAsTool>
|
||||||
<RootNamespace>WireMock.Net</RootNamespace>
|
<RootNamespace>WireMock.Net</RootNamespace>
|
||||||
<ToolCommandName>dotnet-wiremock</ToolCommandName>
|
<ToolCommandName>dotnet-wiremock</ToolCommandName>
|
||||||
<Description>A dotnet commandline tool for WireMock.Net (A Lightweight Http Mocking Server for .NET)</Description>
|
<Description>A dotnet commandline tool for WireMock.Net (A Lightweight Http Mocking Server for .NET)</Description>
|
||||||
<PackageTags>tdd;mock;http;wiremock;test;server;unittest;dotnet;tool;dotnet-tool</PackageTags>
|
<PackageTags>tdd;mock;http;wiremock;test;server;unittest;dotnet;tool;dotnet-tool</PackageTags>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
<PropertyGroup Condition="'$(Configuration)' == 'Release' And '$(PublishSingleFile)' != 'true'">
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj" />
|
<ProjectReference Include="..\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in new issue
Block a user