-
Notifications
You must be signed in to change notification settings - Fork 51
62 lines (62 loc) · 1.84 KB
/
compile.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
name: Compile & release listfile
on:
push:
paths:
- parts/**
jobs:
compile-repo-listfile:
name: Build repo listfile
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Compile with ListfileTool
run: dotnet run --project $PWD/tools/ListfileTool --configuration Release -- compile $PWD/parts $PWD/ true
- name: Update repo
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update in-repo listfile
file_pattern: '*.csv'
compile-release-listfile:
name: Build release listfile
runs-on: ubuntu-latest
steps:
- name: Set tag name
run: echo "NOW=$(date +'%Y%m%d%H%M')" >> $GITHUB_ENV
- name: Create tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ env.NOW }}',
sha: context.sha
})
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Compile with ListfileTool
run: mkdir $PWD/tmp && dotnet run --project $PWD/tools/ListfileTool --configuration Release -- compile $PWD/parts $PWD/tmp
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v0.1.13
with:
name: Full listfile v${{ env.NOW }}
draft: false
prerelease: false
tag_name: ${{ env.NOW }}
files: |
tmp/community-listfile.csv
tmp/community-listfile-withcapitals.csv