-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial release automation * release: read version from version.txt Signed-off-by: Caleb Lloyd <[email protected]> * Test fixes * move signing back up one level Signed-off-by: Caleb Lloyd <[email protected]> * move signing back up one level Signed-off-by: Caleb Lloyd <[email protected]> * Test unused function clean-up --------- Signed-off-by: Caleb Lloyd <[email protected]> Co-authored-by: Caleb Lloyd <[email protected]>
- Loading branch information
Showing
17 changed files
with
111 additions
and
46 deletions.
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,48 @@ | ||
name: Release | ||
|
||
on: workflow_dispatch | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
nuget: | ||
name: dotnet | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- id: tag | ||
name: Determine tag | ||
run: | | ||
version="$(head -n 1 version.txt)" | ||
ref_name="v$version" | ||
create=true | ||
if ["$(git ls-remote origin "refs/tags/$ref_name" | wc -l)" = "1" ]; then | ||
create=false | ||
fi | ||
echo "version=$version" | tee -a "$GITHUB_OUTPUT" | ||
echo "ref-name=$ref_name" | tee -a "$GITHUB_OUTPUT" | ||
echo "create=$create" | tee -a "$GITHUB_OUTPUT" | ||
- if: ${{ fromJSON(steps.tag.outputs.create) }} | ||
name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '6.x' | ||
|
||
- if: ${{ fromJSON(steps.tag.outputs.create) }} | ||
name: Pack | ||
run: dotnet pack -c Release -o dist | ||
|
||
- if: ${{ fromJSON(steps.tag.outputs.create) }} | ||
name: Push | ||
run: dotnet nuget push dist/*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_API_KEY }}" --skip-duplicate | ||
|
||
- if: ${{ fromJSON(steps.tag.outputs.create) }} | ||
name: Tag | ||
run: | | ||
git tag "${{ steps.tag.outputs.ref-name }}" | ||
git push origin "${{ steps.tag.outputs.ref-name }}" |
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 |
---|---|---|
|
@@ -114,4 +114,6 @@ nuget/*.unitypackage | |
# Jetbrains Rider | ||
.idea/ | ||
|
||
# Unity | ||
# NuGet package | ||
/dist | ||
|
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
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,20 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.4" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Client\BlazorWasm.Client.csproj" /> | ||
<ProjectReference Include="..\Shared\BlazorWasm.Shared.csproj" /> | ||
</ItemGroup> | ||
|
||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<IsPackable>false</IsPackable> | ||
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.4" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Client\BlazorWasm.Client.csproj" /> | ||
<ProjectReference Include="..\Shared\BlazorWasm.Shared.csproj" /> | ||
</ItemGroup> | ||
|
||
|
||
</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
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
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
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
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
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
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
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,7 +1,24 @@ | ||
<Project> | ||
<Import Project="..\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- NuGet Packaging --> | ||
<PackageVersion>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)..\version.txt"))</PackageVersion> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<Company>CNCF</Company> | ||
<Authors>The NATS Authors</Authors> | ||
<Copyright>Copyright © The NATS Authors 2016-$([System.DateTime]::Now.ToString(yyyy))</Copyright> | ||
<PackageProjectUrl>https://github.com/nats-io/nats.net.v2</PackageProjectUrl> | ||
<RepositoryUrl>$(PackageProjectUrl)</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<PackageIcon>Icon.png</PackageIcon> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\LICENSE" Pack="true" PackagePath=""/> | ||
<None Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" PackagePath=""/> | ||
<None Include="$(MSBuildThisFileDirectory)..\README.md" Pack="true" PackagePath=""/> | ||
<None Include="$(MSBuildThisFileDirectory)..\Icon.png" Pack="true" PackagePath=""/> | ||
</ItemGroup> | ||
</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
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
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
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
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 @@ | ||
2.0.0-alpha.0 |