File tree 4 files changed +29
-52
lines changed
4 files changed +29
-52
lines changed Original file line number Diff line number Diff line change @@ -3,54 +3,49 @@ name: Build
3
3
on :
4
4
push :
5
5
branches :
6
- - master
7
6
- main
7
+ - develop
8
+ - support/*
9
+ tags :
10
+ - v*
8
11
pull_request :
9
12
branches :
10
- - master
11
13
- main
14
+ - develop
15
+ - support/*
12
16
workflow_call :
13
17
14
18
env :
15
19
DOTNET_NOLOGO : true
16
20
DOTNET_GENERATE_ASPNET_CERTIFICATE : false
17
21
DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
18
- PROJECT : ./src/Our.Umbraco.UiExamples.v13/Our.Umbraco.UiExamples.v13.csproj
19
- OUTPUT : ./dist
22
+ NUGET_PACKAGES : ${{ github.workspace }}/.nuget/packages
20
23
21
24
jobs :
22
25
build :
23
26
name : Build
24
- runs-on : windows -latest
27
+ runs-on : ubuntu -latest
25
28
26
29
steps :
27
30
- name : Checkout
28
- uses : actions/checkout@v2
31
+ uses : actions/checkout@v4
29
32
with :
30
33
fetch-depth : 0
31
34
32
- - name : Cache NuGet packages
33
- uses : actions/cache@v1
35
+ - uses : actions/setup-dotnet@v4
34
36
with :
35
- path : ~/.nuget/packages
36
- key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
37
- restore-keys : |
38
- ${{ runner.os }}-nuget-
37
+ cache : true
39
38
40
39
- name : Restore
41
- run : dotnet restore ${{ env.PROJECT }} --locked-mode
40
+ run : dotnet restore --locked-mode
42
41
43
42
- name : Build
44
- run : dotnet build ${{ env.PROJECT }} -c Release -p:ContinuousIntegrationBuild=true --no-restore
45
-
46
- - name : Setup UmbPack
47
- run : dotnet tool install --tool-path $(Split-Path ${{ env.PROJECT }}) Umbraco.Tools.Packages
43
+ run : dotnet build --configuration Release --property:ContinuousIntegrationBuild=true --no-restore
48
44
49
45
- name : Pack
50
- run : dotnet pack ${{ env.PROJECT }} -c Release -o ${{ env.OUTPUT }} -- no-restore --no-build
46
+ run : dotnet pack --configuration Release -- no-restore --no-build --output ./artifacts/
51
47
52
48
- name : Upload artifacts
53
- uses : actions/upload-artifact@v2
49
+ uses : actions/upload-artifact@v4
54
50
with :
55
- name : packages
56
- path : ${{ env.OUTPUT }}
51
+ path : ./artifacts/
Original file line number Diff line number Diff line change 7
7
description : ' The prerelease tag to apply on the release branch (if any). If not specified, any existing prerelease tag will be removed.'
8
8
required : false
9
9
default : ' '
10
- type : choice
11
- options :
12
- - ' '
13
- - ' beta'
14
- - ' rc'
10
+ type : string
15
11
versionIncrement :
16
12
description : ' Overrides the versionIncrement setting set in version.json for determining the next version of the current branch.'
17
13
required : false
31
27
jobs :
32
28
prepare-release :
33
29
name : Prepare release
34
- runs-on : windows -latest
30
+ runs-on : ubuntu -latest
35
31
36
32
steps :
37
33
- name : Checkout
38
- uses : actions/checkout@v2
34
+ uses : actions/checkout@v4
39
35
with :
40
36
fetch-depth : 0
41
37
@@ -45,14 +41,14 @@ jobs:
45
41
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
46
42
47
43
- name : Setup Nerdbank.GitVersioning
48
- run : dotnet tool install --tool-path . nbgv
44
+ run : dotnet tool install nbgv --tool-path ./artifacts/
49
45
50
46
- name : Prepare release
51
47
run : |
52
48
if ("${{ github.event.inputs.versionIncrement }}") {
53
- ./nbgv prepare-release ${{ github.event.inputs.tag }} -p src --versionIncrement ${{ github.event.inputs.versionIncrement }}
49
+ ./artifacts/ nbgv prepare-release ${{ github.event.inputs.tag }} --versionIncrement ${{ github.event.inputs.versionIncrement }}
54
50
} else {
55
- ./nbgv prepare-release ${{ github.event.inputs.tag }} -p src
51
+ ./artifacts/ nbgv prepare-release ${{ github.event.inputs.tag }}
56
52
}
57
53
58
54
- name : Push commit (and new branch)
Original file line number Diff line number Diff line change 11
11
jobs :
12
12
publish-release :
13
13
name : Publish release
14
- runs-on : windows -latest
14
+ runs-on : ubuntu -latest
15
15
16
16
steps :
17
17
- name : Checkout
18
- uses : actions/checkout@v2
18
+ uses : actions/checkout@v4
19
19
with :
20
20
fetch-depth : 0
21
21
@@ -25,10 +25,10 @@ jobs:
25
25
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
26
26
27
27
- name : Setup Nerdbank.GitVersioning
28
- run : dotnet tool install --tool-path . nbgv
28
+ run : dotnet tool install nbgv --tool-path ./artifacts/
29
29
30
30
- name : Tag release
31
- run : ./nbgv tag -p src
31
+ run : ./artifacts/ nbgv tag
32
32
33
33
- name : Push git tags
34
34
run : git push --tags
Original file line number Diff line number Diff line change 12
12
jobs :
13
13
build :
14
14
name : Build
15
- uses : umbraco/UI-Examples/.github/workflows/build.yml@master
15
+ uses : umbraco/UI-Examples/.github/workflows/build.yml@${GITHUB_REF}
16
16
17
17
publish :
18
18
name : Publish
19
19
needs : build
20
- runs-on : windows -latest
20
+ runs-on : ubuntu -latest
21
21
22
22
steps :
23
23
- name : Download artifacts
24
- uses : actions/download-artifact@v2
25
- with :
26
- name : packages
27
-
28
- - name : Get Umbraco package file name
29
- id : get_package
30
- run : echo "::set-output name=PACKAGE::$(Get-Item *.zip | Select-Object -First 1 -ExpandProperty Name)"
31
-
32
- - name : Setup UmbPack
33
- if : steps.get_package.outputs.PACKAGE
34
- run : dotnet tool install --tool-path . Umbraco.Tools.Packages
35
-
36
- - name : Push to Our.Umbraco
37
- if : steps.get_package.outputs.PACKAGE
38
- run : ./umbpack push ${{ steps.get_package.outputs.PACKAGE }} -k ${{ secrets.OURUMBRACO_API_KEY }} -a *
24
+ uses : actions/download-artifact@v4
39
25
40
26
- name : Push to NuGet
41
27
run : dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
You can’t perform that action at this time.
0 commit comments