-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.48 KB
/
release-umbraco.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: (Umbraco) Our.Umbraco Package Generation
on:
workflow_run:
workflows: [ "Build" ]
types:
- completed
jobs:
our_umbraco:
name: Our.Umbraco Package Generation
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'pull_request' }}
runs-on: ubuntu-latest
env:
# Nuget Setup
NUGET_VERSION: 'latest'
NUGET_OUTPUT: ${{ github.workspace }}/nuget/
NUGET_EXTRACTED: './.output/nuget/extracted/'
# Project Setup
PROJECT_NAME: 'Cogworks.Essentials'
UMBRACO_OUTPUT: './.output/umbraco/'
steps:
- name: Checkout master
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: Get version
shell: bash
run: |
tag_check=$(git describe --exact-match `git rev-parse HEAD` | head -1)
echo "VERSION=$tag_check" >> $GITHUB_ENV
- name: Configure NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: ${{ env.NUGET_VERSION }}
- name: Download a single artifact
uses: aochmann/actions-download-artifact@1.0.2
with:
name: build_${{ env.PROJECT_NAME }}.${{ env.VERSION }}
path: ${{ env.NUGET_OUTPUT }}
- name: Extract NuGet file
shell: pwsh
run: |
Install-Package -Name ${{ env.PROJECT_NAME }} -Source ${{ env.NUGET_OUTPUT }} -Destination ${{ env.NUGET_EXTRACTED }} -SkipDependencies
- name: Copy package dlls
shell: bash
run: |
mkdir -p ${{ env.UMBRACO_OUTPUT }} && find ${{ env.NUGET_EXTRACTED }} -name "*.dll" -print0 | xargs -0 -I {} cp -r {} ${{ env.UMBRACO_OUTPUT }}
- name: Copy package App_Plugins
shell: bash
run: |
mkdir -p ${{ env.UMBRACO_OUTPUT }} && find . -type d -regex ".*/${{ env.PROJECT_NAME }}.${{ env.VERSION }}/.*App_Plugins" -print0 | xargs -0 -I {} cp -r {} ${{ env.UMBRACO_OUTPUT }}
- name: Check Umbraco output directory
shell: bash
run: |
is_empty_directory=$([ "$(ls -A ${{ env.UMBRACO_OUTPUT }})" ] && echo false || echo true)
if [[ is_empty_directory == true ]]; then
echo "Empty output directory: ${{ env.UMBRACO_OUTPUT }}"
exit 1
fi
- name: Upload Our.Umbraco package Artifact to GitHub Action
uses: actions/upload-artifact@v2
with:
name: ${{ env.PROJECT_NAME }}.${{ env.VERSION }}
path: ${{ env.UMBRACO_OUTPUT }}