-
Notifications
You must be signed in to change notification settings - Fork 21
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
1 parent
a33c198
commit 2303f8b
Showing
12 changed files
with
2,113 additions
and
419 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,53 @@ | ||
name: Prepare release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'The prerelease tag to apply on the release branch (if any). If not specified, any existing prerelease tag will be removed.' | ||
required: false | ||
default: '' | ||
type: choice | ||
options: | ||
- '' | ||
- 'beta' | ||
- 'rc' | ||
versionIncrement: | ||
description: 'Specifies which part of the version on the current branch is incremented.' | ||
required: true | ||
default: 'minor' | ||
type: choice | ||
options: | ||
- 'major' | ||
- 'minor' | ||
- 'build' | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_GENERATE_ASPNET_CERTIFICATE: false | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
|
||
jobs: | ||
prepare-release: | ||
name: Prepare release | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure git | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
- name: Setup Nerdbank.GitVersioning | ||
run: dotnet tool install --tool-path . nbgv | ||
|
||
- name: Prepare release | ||
run: ./nbgv prepare-release ${{ github.event.inputs.tag }} -p src --versionIncrement ${{ github.event.inputs.versionIncrement }} | ||
|
||
- name: Push commit (and new branch) | ||
run: git push --all |
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,34 @@ | ||
name: Publish release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_GENERATE_ASPNET_CERTIFICATE: false | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
|
||
jobs: | ||
publish-release: | ||
name: Publish release | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure git | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
- name: Setup Nerdbank.GitVersioning | ||
run: dotnet tool install --tool-path . nbgv | ||
|
||
- name: Tag release | ||
run: ./nbgv tag -p src | ||
|
||
- name: Push git tags | ||
run: git push --tags |
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 was deleted.
Oops, something went wrong.
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,108 +1,36 @@ | ||
variables: | ||
buildConfiguration: Release | ||
slnFilename: Umbraco.StorageProviders.sln | ||
stages: | ||
- stage: Artifacts | ||
dependsOn: [] | ||
jobs: | ||
- job: Build_Artifacts | ||
displayName: Build Artifacts | ||
pool: | ||
vmImage: windows-latest | ||
steps: | ||
- task: UseDotNet@2 | ||
displayName: Use .Net Core sdk 5.x | ||
inputs: | ||
version: 5.x | ||
- task: NuGetToolInstaller@1 | ||
displayName: Use NuGet Latest | ||
- task: NuGetCommand@2 | ||
displayName: Restore NuGet Packages | ||
inputs: | ||
restoreSolution: $(slnFilename) | ||
feedsToUse: config | ||
- task: PowerShell@1 | ||
displayName: Update Version and Artifact Name | ||
inputs: | ||
scriptType: inlineScript | ||
inlineScript: > | ||
Write-Host "Working folder: $pwd" | ||
$ubuild = build/build.ps1 -get -continue | ||
$version = $ubuild.GetUmbracoVersion() | ||
$isRelease = [regex]::matches($env:BUILD_SOURCEBRANCH,"v\d+\/\d+.\d+.*") | ||
if ($isRelease.Count -gt 0){ | ||
$continuous = $version.Semver | ||
Write-Host "##vso[build.addbuildtag]Release build" | ||
} | ||
else | ||
{ | ||
$date = (Get-Date).ToString("yyyyMMdd") | ||
$continuous = "$($version.release)-preview$date.$(Build.BuildId)" | ||
$ubuild.SetUmbracoVersion($continuous) | ||
solution: Umbraco.StorageProviders.sln | ||
buildConfiguration: Release | ||
NUGET_PACKAGES: '' | ||
DOTNET_NOLOGO: true | ||
DOTNET_GENERATE_ASPNET_CERTIFICATE: false | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
|
||
Write-Host "##vso[build.addbuildtag]Continuous build" | ||
} | ||
Write-Host "##vso[build.updatebuildnumber]$continuous.$(Build.BuildId)" | ||
Write-Host "Building: $continuous" | ||
- task: PowerShell@1 | ||
displayName: Prepare Build | ||
inputs: | ||
scriptType: inlineScript | ||
inlineScript: | | ||
Write-Host "Working folder: $pwd" | ||
$ubuild = build\build.ps1 -get | ||
$ubuild.PrepareBuild("vso") | ||
- task: PowerShell@1 | ||
displayName: Prepare Packages & Zip | ||
inputs: | ||
scriptType: inlineScript | ||
inlineScript: | | ||
Write-Host "Working folder: $pwd" | ||
$ubuild = build\build.ps1 -get -continue | ||
$ubuild.CompileUmbracoStorageProviders() | ||
$ubuild.PreparePackages() | ||
- task: PowerShell@1 | ||
displayName: Verify & Package NuGet | ||
inputs: | ||
scriptType: inlineScript | ||
inlineScript: | | ||
Write-Host "Working folder: $pwd" | ||
$ubuild = build\build.ps1 -get -continue | ||
$ubuild.PackageNuGet() | ||
- task: CopyFiles@2 | ||
displayName: Copy NuPkg Files to Staging | ||
inputs: | ||
SourceFolder: build.out | ||
Contents: '*.nupkg' | ||
TargetFolder: $(build.artifactstagingdirectory) | ||
CleanTargetFolder: true | ||
- task: PublishBuildArtifacts@1 | ||
displayName: Publish NuPkg Files | ||
inputs: | ||
PathtoPublish: $(build.artifactstagingdirectory) | ||
ArtifactName: nupkg | ||
- task: CopyFiles@2 | ||
displayName: Copy Log Files to Staging | ||
inputs: | ||
SourceFolder: build.tmp | ||
Contents: '*.log' | ||
TargetFolder: $(build.artifactstagingdirectory) | ||
CleanTargetFolder: true | ||
condition: succeededOrFailed() | ||
- task: PublishBuildArtifacts@1 | ||
displayName: Publish Log Files | ||
inputs: | ||
PathtoPublish: $(build.artifactstagingdirectory) | ||
ArtifactName: logs | ||
condition: succeededOrFailed() | ||
stages: | ||
- stage: Artifacts | ||
jobs: | ||
- job: Build | ||
pool: | ||
vmImage: windows-latest | ||
steps: | ||
- task: Cache@2 | ||
displayName: Cache NuGet packages | ||
inputs: | ||
key: 'nuget | "$(Agent.OS)" | **/packages.lock.json' | ||
path: '$(NUGET_PACKAGES)' | ||
cacheHitVar: 'CACHE_RESTORED' | ||
|
||
- script: dotnet restore $(solution) --locked-mode | ||
displayName: Restore NuGet packages | ||
condition: ne(variables.CACHE_RESTORED, true) | ||
|
||
- script: dotnet build $(solution) -c $(buildConfiguration) -p:ContinuousIntegrationBuild=true --no-restore | ||
displayName: Build | ||
|
||
- script: dotnet pack $(solution) -c $(buildConfiguration) -o $(Build.ArtifactStagingDirectory) --no-restore --no-build | ||
displayName: Pack | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: Publish NuGet packages | ||
inputs: | ||
ArtifactName: nupkg |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.