-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
134 additions
and
75 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 |
---|---|---|
|
@@ -42,12 +42,17 @@ jobs: | |
run: msbuild $env:Solution_Name /p:Configuration=Debug /p:Platform="Any CPU" | ||
|
||
- name: Telnet.CiTests | ||
uses: rusty-bender/vstest-action@main | ||
uses: rusty-bender/vstest-action@main | ||
with: | ||
testAssembly: PrimS.Telnet.CiTests.dll | ||
searchFolder: ./**/bin/Debug/**/ | ||
runInParallel: true | ||
|
||
- name: Remove File | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: ../../rusty-bender/vstest-action/main/dist | ||
|
||
# Can't apparently run both full fat and core test suites together.' | ||
- name: Telnet.*.CiTests | ||
uses: rusty-bender/vstest-action@main | ||
|
@@ -61,22 +66,26 @@ jobs: | |
|
||
- name: Run GitVersion | ||
run: | | ||
dotnet-gitversion /showConfig | ||
$str = dotnet-gitversion /updateprojectfiles | out-string | ||
$json = ConvertFrom-Json $str | ||
$json | ||
$semVer = $json.SemVer | ||
$fullSemVer = $json.FullSemVer | ||
$nuGetVersionV2 = $json.NuGetVersionV2 | ||
$buildMetaDataPadded = $json.BuildMetaDataPadded | ||
$nuGetVersionV2 = $json.MajorMinorPatch | ||
$buildMetaDataPadded = "$($json.MajorMinorPatch)$($json.PreReleaseTagWithDash)$($json.WeightedPreReleaseNumber)" | ||
Write-Host $json | ||
Write-Host $semVer | ||
Write-Host $fullSemVer | ||
Write-Host $nuGetVersionV2 | ||
Write-Host "semVer:" $semVer | ||
Write-Host "fullSemVer:" $fullSemVer | ||
Write-Host "nuGetVersionV2:" $nuGetVersionV2 | ||
Write-Host "Pre buildMetaDataPadded:" $buildMetaDataPadded | ||
if (${buildMetaDataPadded} = "0000") { | ||
${buildMetaDataPadded} = '' | ||
} | ||
Write-Host ${nuGetVersionV2}${buildMetaDataPadded} | ||
Write-Host "Post buildMetaDataPadded:" $buildMetaDataPadded | ||
Write-Host "NuGetVersionV2ext:${nuGetVersionV2}${buildMetaDataPadded}" | ||
echo "FullSemVer=$fullSemVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "SemVer=$semVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
|
@@ -87,22 +96,22 @@ jobs: | |
run: msbuild $env:Solution_Name /p:Configuration=Release /p:Platform="Any CPU" | ||
|
||
- name: Nuget pack | ||
run: nuget pack Telnet.nuspec -Version $Env:NuGetVersionV2ext | ||
run: nuget pack Telnet.nuspec -Version $Env:SemVer | ||
|
||
# Navigate to https://github.com/settings/tokens and check to see if the old token has expired | ||
# https://github.com/settings/tokens to create a new classic token, permission write:packages, name & copy paste to PUBLISH_TO_GITHUB_PACKAGES | ||
# Navigate to repo->Settings->Secrets and variables->Actions and check PUBLISH_TO_GITHUB_PACKAGES | ||
- name: Publish to GitHub | ||
run: dotnet nuget push "Telnet.$Env:NuGetVersionV2ext.nupkg" --api-key ${{ secrets.PUBLISH_TO_GITHUB_PACKAGES }} --source "https://nuget.pkg.github.com/9swampy/index.json" | ||
run: dotnet nuget push "Telnet.$Env:SemVer.nupkg" --api-key ${{ secrets.PUBLISH_TO_GITHUB_PACKAGES }} --source "https://nuget.pkg.github.com/9swampy/index.json" | ||
|
||
# Login to Nuget 9swampy->Api Keys and regenerate, copy to... | ||
# GitHub navigate to repo->Settings->Secrets and variables->Actions and set NUGET_APIKEY | ||
- name: Publish to Nuget | ||
if: github.ref == 'refs/heads/master' | ||
run: nuget push "Telnet.$Env:NuGetVersionV2ext.nupkg" ${{ secrets.NUGET_APIKEY }} -source https://api.nuget.org/v3/index.json | ||
run: nuget push "Telnet.$Env:SemVer.nupkg" ${{ secrets.NUGET_APIKEY }} -source https://api.nuget.org/v3/index.json | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: published-nuget-package | ||
path: Telnet.*.nupkg | ||
|
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
Oops, something went wrong.