diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f20f9ee..95eb046 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,7 @@ jobs: env: DOTNET_CLI_TELEMTRY_OPTOUT: true NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: pwsh run: | ./Build.ps1 \ No newline at end of file diff --git a/Build.ps1 b/Build.ps1 index 3e862ad..dcdafc0 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -21,7 +21,7 @@ try { $branch = @{ $true = $env:CI_TARGET_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$NULL -ne $env:CI_TARGET_BRANCH]; $revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:CI_BUILD_NUMBER, 10); $false = "local" }[$NULL -ne $env:CI_BUILD_NUMBER]; - $suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)) -replace '([^a-zA-Z0-9\-]*)', '')-$revision"}[$branch -eq "main" -and $revision -ne "local"] + $suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)) -replace '([^a-zA-Z0-9\-]*)', '')-$revision"}[$branch -eq "master" -and $revision -ne "local"] $commitHash = $(git rev-parse --short HEAD) $buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""] @@ -59,7 +59,7 @@ try { if ($env:NUGET_API_KEY) { # GitHub Actions will only supply this to branch builds and not PRs. We publish - # builds from any branch this action targets (i.e. main and dev). + # builds from any branch this action targets (i.e. master and dev). Write-Output "build: Publishing NuGet package" diff --git a/Directory.Version.props b/Directory.Version.props index 454e3ba..581c1f4 100644 --- a/Directory.Version.props +++ b/Directory.Version.props @@ -1,5 +1,5 @@ - 0.1.0 + 1.0.0 \ No newline at end of file