Skip to content

Commit 7a23b84

Browse files
authored
Release 0.17.0 (#58)
* Create dotnet.yml Upgrading CI/CD to GithubActions * .NET 6 * Updating workflows * github package * tweaking yaml * Fixed path? * removed path * added path back * ugh * added gitver * tweaking ver * new giver stuff for 18.3 * new publish workflow * added nuget.org publishing * renamed master to main * Cleaned up old build files * Disable publishing to GitHub Packages * Disable publishing to GitHub Packages * Revert to v 0.17 * reverted readme
1 parent c2ebd71 commit 7a23b84

File tree

11 files changed

+162
-90
lines changed

11 files changed

+162
-90
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build NStack
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
outputs:
14+
Version: ${{ steps.gitversion.outputs.SemVer }}
15+
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0 #fetch-depth is needed for GitVersion
21+
22+
#Install and calculate the new version with GitVersion
23+
- name: Install GitVersion
24+
uses: gittools/actions/gitversion/[email protected]
25+
with:
26+
versionSpec: 5.x
27+
- name: Determine Version
28+
uses: gittools/actions/gitversion/[email protected]
29+
id: gitversion # step id used as reference for output values
30+
- name: Display GitVersion outputs
31+
run: |
32+
echo "Version: ${{ steps.gitversion.outputs.SemVer }}"
33+
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
34+
35+
- name: Setup .NET
36+
uses: actions/setup-dotnet@v2
37+
with:
38+
dotnet-version: 6.0.x
39+
40+
- name: Restore dependencies
41+
run: dotnet restore
42+
43+
- name: Build Debug
44+
run: |
45+
dotnet-gitversion /updateprojectfiles
46+
dotnet build --no-restore -c Debug
47+
48+
- name: Test
49+
run: dotnet test --no-build --verbosity normal

.github/workflows/publish.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish NStack.Core to NuGet
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
7+
jobs:
8+
9+
publish:
10+
name: build, pack & publish
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0 #fetch-depth is needed for GitVersion
17+
18+
- name: Install and calculate the new version with GitVersion
19+
uses: gittools/actions/gitversion/[email protected]
20+
with:
21+
versionSpec: 5.x
22+
- name: Determine Version
23+
uses: gittools/actions/gitversion/[email protected]
24+
id: gitversion # step id used as reference for output values
25+
- name: Display GitVersion outputs
26+
run: |
27+
echo "Version: ${{ steps.gitversion.outputs.SemVer }}"
28+
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
29+
30+
- name: Setup .NET
31+
uses: actions/setup-dotnet@v2
32+
with:
33+
dotnet-version: 6.0.x
34+
35+
- name: Restore dependencies
36+
run: dotnet restore
37+
38+
- name: Build Release
39+
run: |
40+
dotnet-gitversion /updateprojectfiles
41+
dotnet build --no-restore -c Release
42+
43+
- name: Pack
44+
run: dotnet pack -c Release -p:Version='${{ steps.gitversion.outputs.SemVer }}' -v d
45+
46+
#- name: Prep GitHub Packages
47+
# run: dotnet nuget add source --username tig --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/tig/index.json"
48+
49+
#- name: Publish to GitHub packages
50+
# run: dotnet nuget push NStack/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
51+
52+
- name: Publish to NuGet.org
53+
run: dotnet nuget push NStack/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
all: dotnet-build doc-update yaml
22

33
dotnet-build:
4+
dotnet-gitversion /updateprojectfiles
45
msbuild NStack.sln /t:clean /p:configuration=Release
56
msbuild NStack.sln -t:restore -p:RestorePackagesConfig=true /p:configuration=Release
67
msbuild NStack.sln /p:Configuration=Release /p:DocumentationFile="bin/Release/NStack.xml"

NStack.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NStack", "NStack\NStack.csp
66
EndProject
77
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NStackTests", "NStackTests\NStackTests.csproj", "{21125504-5F4D-48A3-8978-A552627A8D26}"
88
EndProject
9+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{760C271D-E55A-4F44-BE2C-9B476D310CAC}"
10+
ProjectSection(SolutionItems) = preProject
11+
.github\workflows\build.yml = .github\workflows\build.yml
12+
.github\workflows\publish.yml = .github\workflows\publish.yml
13+
README.md = README.md
14+
EndProjectSection
15+
EndProject
916
Global
1017
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1118
Debug|Any CPU = Debug|Any CPU

NStack/Makefile

Lines changed: 0 additions & 6 deletions
This file was deleted.

NStack/NStack.Core.nuspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata>
44
<id>NStack.Core</id>
5-
<version>0.4.0</version>
5+
<!--Version is managed by gitver now. See publish.yml-->
6+
<version>0.0.0</version>
67
<title>NStack.Core</title>
78
<authors>Miguel de Icaza</authors>
89
<owners>Miguel de Icaza</owners>

NStack/NStack.csproj

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<Import Project="..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.props" Condition="Exists('..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.props')" />
4-
53
<PropertyGroup>
64
<TargetFramework>netstandard2.0</TargetFramework>
5+
<RepositoryUrl>https://github.com/tig/NStack</RepositoryUrl>
76
<PackageId>NStack.Core</PackageId>
87
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
9-
<PackageVersion>0.16</PackageVersion>
108
<Authors>Miguel de Icaza</Authors>
119
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1210
<Owners>Miguel de Icaza</Owners>
1311
<PackageProjectUrl>http://github.com/migueldeicaza/NStack</PackageProjectUrl>
14-
<Summary>NStack.Core brings a set of updated APIs to .NET including a UTF8-string aware string.</Summary>
12+
<Summary>NStack.Core brings a set of updated string APIs to .NET including a UTF8-string aware string.</Summary>
1513
<PackageTags>unicode, c#</PackageTags>
1614
<Title>NStack.Core</Title>
17-
<Description>NStack.Core brings a set of updated APIs to .NET.
15+
<Description>NStack.Core brings a set of updated string APIs to .NET.
1816

1917
It starts with a new string type that is focused on Unicode code-points as opposed to the historical chars and UTF-16 encoding and introduces a utf8 string that supports slicing</Description>
20-
<ReleaseVersion>0.3</ReleaseVersion>
21-
<PackageReleaseNotes>0.16: Fixes issue #51 (chess symbols); 0.15: Fixes to MaxRune; ColumnWidth differentiates between non-printable and nul characters; Rune has a constructor from two surrogate pairs; contributions by @BDisp; 0.14: Upgrade the NetStandard dependencies;
22-
18+
<PackageReleaseNotes>
19+
0.17: Fork by @tig modernize build/deploy and help publishing newer versions. No functional changes.
20+
0.16: Fixes issue #51 (chess symbols);
21+
0.15: Fixes to MaxRune; ColumnWidth differentiates between non-printable and nul characters; Rune has a constructor from two surrogate pairs; contributions by @BDisp;
22+
0.14: Upgrade the NetStandard dependencies;
2323
0.13: Fixes ustring.Map() and Lower(); Extends Rune.IsValid to match Go; add Rune.ExpectedSizeFromFirstByte() plus a bug fix;
24-
stack 0.12: Rebuilt
24+
stack
25+
0.12: Rebuilt
2526
Rebuild with an older Roslyn, to prevent regressions on Xamarin.
26-
2727
0.10:
2828
Merged some changes from upstream.
2929

@@ -34,21 +34,27 @@ Added ustring.ColumnWidth to return number of columns that a ustring takes in a
3434
* Renamed some methods to match the equivalent methods in Char.
3535
* Introduced Substring (int start)
3636
* Introduced difference between this [int start, int end] and this [int start, object end] the latter used to mean "until the end", replacing '0' as the previous value for "until the end".
37-
* Introduced new method in Rune to measure the width in columns for console applications.</PackageReleaseNotes>
37+
* Introduced new method in Rune to measure the width in columns for console applications.
38+
</PackageReleaseNotes>
39+
40+
<!--Version is managed by gitver now. See publish.yml-->
41+
<AssemblyVersion>0.20.0.0</AssemblyVersion>
42+
<FileVersion>0.20.0.0</FileVersion>
43+
<InformationalVersion>0.20.0+Branch.main.Sha.8157792de6c7c039bf62aea2965505b27d1fffc9</InformationalVersion>
44+
<Version>0.20.0</Version>
3845
</PropertyGroup>
39-
4046
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
4147
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
42-
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
48+
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
4349
<DocumentationFile>bin\Release\NStack.xml</DocumentationFile>
4450
<LangVersion>Latest</LangVersion>
4551
</PropertyGroup>
4652
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
4753
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
4854
<LangVersion>Latest</LangVersion>
4955
</PropertyGroup>
50-
<Import Project="..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.targets" Condition="Exists('..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.targets')" />
51-
<ItemGroup>
52-
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
53-
</ItemGroup>
54-
</Project>
56+
<Import Project="..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.targets" Condition="Exists('..\packages\NuGet.Build.Packaging.0.1.248\build\NuGet.Build.Packaging.targets')" />
57+
<ItemGroup>
58+
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
59+
</ItemGroup>
60+
</Project>

NStackTests/NStackTests.csproj

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
7-
<IsPackable>false</IsPackable>
8-
9-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
10-
</PropertyGroup>
11-
12-
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
14-
<PackageReference Include="NUnit" Version="3.13.2" />
15-
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
16-
<PackageReference Include="coverlet.collector" Version="3.1.2">
17-
<PrivateAssets>all</PrivateAssets>
18-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19-
</PackageReference>
20-
</ItemGroup>
21-
22-
<ItemGroup>
23-
<ProjectReference Include="..\NStack\NStack.csproj" />
24-
</ItemGroup>
25-
26-
</Project>
2+
<PropertyGroup>
3+
<TargetFramework>net6.0</TargetFramework>
4+
<Nullable>enable</Nullable>
5+
<IsPackable>false</IsPackable>
6+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7+
<AssemblyVersion>0.20.0.0</AssemblyVersion>
8+
<FileVersion>0.20.0.0</FileVersion>
9+
<InformationalVersion>0.20.0+Branch.main.Sha.8157792de6c7c039bf62aea2965505b27d1fffc9</InformationalVersion>
10+
<Version>0.20.0</Version>
11+
</PropertyGroup>
12+
<ItemGroup>
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
14+
<PackageReference Include="NUnit" Version="3.13.2" />
15+
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
16+
<PackageReference Include="coverlet.collector" Version="3.1.2">
17+
<PrivateAssets>all</PrivateAssets>
18+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19+
</PackageReference>
20+
</ItemGroup>
21+
<ItemGroup>
22+
<ProjectReference Include="..\NStack\NStack.csproj" />
23+
</ItemGroup>
24+
</Project>

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
[![Build Status](https://travis-ci.org/migueldeicaza/NStack.svg?branch=master)](https://travis-ci.org/migueldeicaza/NStack)
44

5-
Currently this module contains a port of the Go string, and Go rune
6-
support as well as other Unicode helper methods.
5+
Currently this library contains a port of the Go string, and Go rune support as well as other Unicode helper methods.
76

87
You can browse the [API documentation](https://migueldeicaza.github.io/NStack/api/NStack.html).
98

10-
Install the [NuGet package](https://www.nuget.org/packages/NStack.Core) by installing
11-
`NStack.Core`.
9+
Install the [NuGet package from NuGet.org](https://www.nuget.org/packages/NStack.Core) by installing `NStack.Core`.
1210

1311
# Future Additions
1412

azure-pipelines.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)