Skip to content

Commit c8aec35

Browse files
authored
Merge pull request #1 from umbraco/build-actions
Build Actions
2 parents dfef7a5 + be800ef commit c8aec35

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/ui-examples.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Builds a library, and packages it up.
2+
#
3+
# Works on a release/version tag
4+
# e.g release/1.0.2 will build v1.0.2
5+
#
6+
7+
name: Pack UI Examples
8+
9+
env:
10+
OUTPUT: ./Output
11+
12+
on:
13+
push:
14+
tags:
15+
- "release/*"
16+
17+
jobs:
18+
build:
19+
runs-on: windows-latest
20+
21+
steps:
22+
- name: Get Version
23+
id: get_version
24+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/release\//}
25+
shell: bash
26+
27+
- name: checkout
28+
uses: actions/checkout@v2
29+
30+
- name: Setup NuGet.exe for use with actions
31+
uses: NuGet/setup-nuget@v1
32+
with:
33+
nuget-version: ${{ matrix.nuget }}
34+
35+
- name: Setup .net core
36+
uses: actions/setup-dotnet@v1.4.0
37+
38+
- name: Setup UmbPack
39+
run: dotnet tool install Umbraco.Tools.Packages --global
40+
41+
- name: Setup MSBuild
42+
uses: microsoft/setup-msbuild@v1
43+
44+
- name: Restore Packages
45+
run: dotnet restore
46+
47+
- name: Build Project
48+
run: msbuild -p:Configuration=Release
49+
50+
# path to your package.xml file should go here.
51+
- name: Create Umbraco package file
52+
run: UmbPack pack ./package.xml -o ${{ env.OUTPUT }} -v ${{ steps.get_version.outputs.VERSION }}
53+
54+
# # For the push step to work you will need to create an api key on Our, and save it as a secret on Github with the name "UMBRACO_DEPLOY_KEY"
55+
- name: Push package to Our
56+
run: umbpack push ${{ env.OUTPUT }}/UiExamples_${{ steps.get_version.outputs.VERSION }}.zip -k ${{ secrets.UMBRACO_DEPLOY_KEY }}
57+
58+
- name: upload-artifacts
59+
uses: actions/upload-artifact@v2
60+
with:
61+
name: Build-Results-${{ steps.get_version.outputs.VERSION }}
62+
path: ${{ env.OUTPUT }}/**/*

0 commit comments

Comments
 (0)