-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·82 lines (76 loc) · 2.32 KB
/
BUILD.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
77
78
79
80
81
82
name: Build
on:
workflow_dispatch:
push:
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: control/package-lock.json
- uses: actions/setup-dotnet@v3
# Build solution
# - https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables
- run: dotnet build
env:
DOTNET_ROLL_FORWARD: Major
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
# Prepare artifact(s)
# - Create an arbitrary file in the root of the dist directory.
# - This is to try and make it clearer that there is a nested zip inside the artifact zip file.
- run: echo "${{ github.server_url }}/${{ github.repository }}" > ./dist/repo-url.txt
- name: 'Upload artifact'
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}__extract_this_zip
path: ./dist/*
retention-days: 15
validate-resx-files:
name: Validate resx files
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup xmllint
run: |
if ! command -v xmllint &> /dev/null
then
sudo apt-get update
sudo apt-get install -y libxml2-utils
fi
shell: bash
- name: Check resx files contain valid xml
run: |
shopt -s globstar
for resx_file in $(/bin/ls ./**/*.resx)
do
if xmllint --noout "$resx_file" > /dev/null 2>&1 ;
then
echo "Valid: $resx_file"
else
echo "Invalid: $resx_file" && exit 1
fi
done
shell: bash
validate-editor-config:
name: Validate editor config
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Setup editorconfig-checker
run: npm i -g editorconfig-checker
- name: Run editorconfig-checker
run: editorconfig-checker