-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.44 KB
/
main.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
name: Generate Meta files
on:
workflow_dispatch:
jobs:
generate-meta:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
fetch-depth: 0
- name: Restore cache
id: adt-meta-cache-restore
uses: actions/cache/restore@v4
with:
path: build/Cache
key: adt-meta-cache
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet publish --no-restore -o build --framework net8.0
- name: Generate Meta data
run: dotnet build/ADTMeta.dll wow ${{ github.workspace }}/Meta
- name: Delete previous cache
if: ${{ steps.adt-meta-cache-restore.outputs.cache-hit }}
continue-on-error: true
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "adt-meta-cache" --confirm
env:
GH_TOKEN: ${{ secrets.ACTION_TOKEN }}
- name: Save cache
id: adt-meta-cache-save
uses: actions/cache/save@v4
with:
path: build/Cache
key: adt-meta-cache
- name: Commit & Push changes
uses: actions-js/push@master
with:
author_name: ADT Meta
message: Update ADT Meta
branch: ${{ github.head_ref || github.ref_name }}
github_token: ${{ secrets.ACTION_TOKEN }}