-
Notifications
You must be signed in to change notification settings - Fork 6
90 lines (76 loc) · 2.43 KB
/
Copy pathbuild.yaml
File metadata and controls
90 lines (76 loc) · 2.43 KB
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
83
84
85
86
87
88
89
90
name: Full Build
permissions:
contents: write
on:
push:
branches: [ master ]
tags: [ '*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get tag number from tag string
id: tag_number
if: ${{ startsWith( github.ref, 'refs/tags/' ) }}
run: |
orig_tag="${{ github.ref_name }}"
echo "tag_number=${orig_tag/v/}" >> $GITHUB_OUTPUT
shell: bash
- name: Checkout master
uses: actions/checkout@v4
with:
ref: master
path: master
- name: Setup MAPI
uses: BadMagic100/setup-hk@v2
with:
apiPath: HkRefs
dependencyFilePath: master/ModDependencies.txt
- name: Install dependencies master
run: dotnet restore
shell: bash
working-directory: master
- name: Build master
run: dotnet build -c Release /p:AssemblyVersion=${{ steps.tag_number.outputs.tag_number }}
shell: bash
working-directory: master
- name: Prepare master artifacts for release
uses: christopherhx/gitea-upload-artifact@v4
with:
name: Publish-Master
path: master/bin/Publish
release:
if: ${{ startsWith( github.ref, 'refs/tags/' ) }}
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: christopherhx/gitea-download-artifact@v4
with:
path: artifacts
- name: Get build details
id: details
run: |
sha="$(sed '4q;d' artifacts/Publish-Master/LanguageSupport/SHA.txt)"
ver="${{ github.ref_name }}"
echo "archiveHash=$sha" >> $GITHUB_OUTPUT
echo "buildVersion=$ver" >> $GITHUB_OUTPUT
shell: bash
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: false
generate_release_notes: true
fail_on_unmatched_files: true
tag_name: ${{ steps.details.outputs.buildVersion }}
body: |
SHA256 of LanguageSupport.zip: ${{ steps.details.outputs.archiveHash }}
Attachments:
- LanguageSupport.zip
- to be used for the ModInstaller
- LanguageSupport.dll
- the mod, also inside LanguageSupport.zip
files: |
artifacts/Publish-Master/LanguageSupport/LanguageSupport.zip
artifacts/Publish-Master/LanguageSupport/LanguageSupport.dll