Skip to content
This repository was archived by the owner on Apr 6, 2022. It is now read-only.

Commit fb1f411

Browse files
committed
first
0 parents  commit fb1f411

23 files changed

+1091
-0
lines changed

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.github/workflows/build.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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: Build and Package
8+
9+
env:
10+
OUTPUT: ./Output
11+
LIBRARY_FOLDER: ./src/Our.Umbraco.BlockListMvc
12+
CONFIG: release
13+
14+
on:
15+
push:
16+
tags:
17+
- "release/*"
18+
19+
jobs:
20+
build:
21+
runs-on: windows-latest
22+
23+
steps:
24+
- name: Get Version
25+
id: get_version
26+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/release\//}
27+
shell: bash
28+
29+
- name: checkout
30+
uses: actions/checkout@v2
31+
32+
- name: Setup NuGet.exe for use with actions
33+
uses: NuGet/setup-nuget@v1.0.2
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 ./src
46+
47+
- name: Build Project
48+
run: msbuild ./src -p:Configuration=${{ env.CONFIG }}
49+
50+
- name: Create NuGet package file
51+
run: dotnet pack ${{ env.LIBRARY_FOLDER }} -c ${{ env.CONFIG }} --no-build --include-symbols -o ${{ env.OUTPUT }} /p:version=${{ steps.get_version.outputs.VERSION }}
52+
53+
# # For the push step to work you will need to create an api key on NuGet, and save it as a secret on Github with the name "NUGET_DEPLOY_KEY"
54+
# - name: Push package to NuGet
55+
# run: dotnet nuget push ${{ env.OUTPUT }}/*.nupkg -k ${{ secrets.NUGET_DEPLOY_KEY } -s https://api.nuget.org/v3/index.json
56+
57+
# path to your package.xml file should go here.
58+
- name: Create Umbraco package file
59+
run: UmbPack pack ./package.xml -o ${{ env.OUTPUT }} -v ${{ steps.get_version.outputs.VERSION }}
60+
61+
# # 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"
62+
# - name: Push package to Our
63+
# run: umbpack push ${{ env.OUTPUT }}/Our.Umbraco.BlockListMvc_${{ steps.get_version.outputs.VERSION }}.zip -k ${{ secrets.UMBRACO_DEPLOY_KEY }}
64+
65+
- name: upload-artifacts
66+
uses: actions/upload-artifact@v2
67+
with:
68+
name: Build-Results-${{ steps.get_version.outputs.VERSION }}
69+
path: ${{ env.OUTPUT }}/**/*

.github/workflows/readme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Github Workflow Actions
2+
3+
This project contains some basic github actions that will allow
4+
you to automate the build and deployment of your projects.
5+
6+
## build.yml
7+
This script will build and package your project, based on a
8+
`release` tag.
9+
10+
if you tag a commit with `release/(version)` (where version is the version you want e.g `release/1.0.0` ) then the build will produce a NuGet and umbraco package of that version.

0 commit comments

Comments
 (0)