Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_call:

env:
PROJECT: ./src/Our.Umbraco.UiExamples/Our.Umbraco.UiExamples.csproj
Expand All @@ -12,6 +19,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup UmbPack
run: dotnet tool install Umbraco.Tools.Packages --global
Expand All @@ -20,12 +29,13 @@ jobs:
run: dotnet restore ${{env.PROJECT}}

- name: Build
run: dotnet build ${{env.PROJECT}} -c Release --no-restore
run: dotnet build ${{env.PROJECT}} -c Release -p:ContinuousIntegrationBuild=true --no-restore

- name: Pack
run: dotnet pack ${{env.PROJECT}} -c Release -o ${{env.OUTPUT}} --no-restore --no-build

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: packages
path: ${{env.OUTPUT}}
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
push:
tags:
- 'release-*'

jobs:
build:
name: Build
uses: umbraco/UI-Examples/.github/workflows/build.yml@master

publish:
name: Publish
runs-on: windows-latest

steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: packages

- name: Setup UmbPack
run: dotnet tool install Umbraco.Tools.Packages --global

- name: Get Umbraco package file name
run: |
$packageFile = Get-Item *.zip | Select-Object -First 1 -ExpandProperty Name
echo "packageFile=$packageFile" >> $GITHUB_ENV

- name: Push to Our Umbraco
run: umbpack push "$env:packageFile" -k "$env:apiKey" -a *
env:
apiKey: ${{ secrets.OURUMBRACO_API_KEY }}

- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "$env:apiKey" --skip-duplicate
env:
apiKey: ${{ secrets.NUGET_API_KEY }}
4 changes: 3 additions & 1 deletion UI Examples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C66805F-8D60-40A9-AD57-856E38793846}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
src\version.json = src\version.json
.gitattributes = .gitattributes
.gitignore = .gitignore
.github\workflows\build.yml = .github\workflows\build.yml
CONTRIBUTING.md = CONTRIBUTING.md
README.md = README.md
EndProjectSection
Expand Down
10 changes: 10 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.244" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Our.Umbraco.UiExamples/Our.Umbraco.UiExamples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<!-- NuGet package info -->
<PropertyGroup>
<PackageId>Our.Umbraco.UiExamples</PackageId>
<Version>2.0.0</Version>

<PackageIconUrl></PackageIconUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://our.umbraco.com/packages/developer-tools/ui-examples/</PackageProjectUrl>
<PackageTags>Umbraco</PackageTags>

<RepositoryUrl>https://github.com/umbraco/UI-Examples</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>

<Description>A collection of backoffice elements designed to help Umbraco developers extend the backoffice.</Description>
<PackageReleaseNotes>
Expand Down
16 changes: 16 additions & 0 deletions src/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "2.0.0",
"release": {
"branchName": "release/{version}"
},
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/release/\\d+(\\.\\d+)?(\\.\\d+)?$"
],
"cloudBuild": {
"buildNumber": {
"enabled": true
}
}
}