-
-
Notifications
You must be signed in to change notification settings - Fork 15
78 lines (68 loc) · 2.66 KB
/
release-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
name: "Release Build"
on:
push:
tags:
- "v*.*.*.*"
env:
RELEASE_NAME: ${{ github.ref_name }}
ARTIFACT_NAME: CnCNet-Spawner_${{ github.ref_name }}
SOLUTION_PATH: .
BUILD_CONFIGURATION: Release
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
uses: ./.github/actions/build
with:
sln-path: ${{ env.SOLUTION_PATH }}
build-config: ${{ env.BUILD_CONFIGURATION }}
artifact-name: compiled-dll-regular-${{ github.sha }}
- name: Build HardEnd
uses: ./.github/actions/build
with:
sln-path: ${{ env.SOLUTION_PATH }}
build-config: ${{ env.BUILD_CONFIGURATION }}-HardEnd
artifact-name: compiled-dll-hardend-${{ github.sha }}
- name: Create Archive For Release
run: |
mkdir ./artifact
mkdir ./artifact/Regular
copy ./LICENSE.md ./artifact/Regular/LICENSE.md
copy ./README.md ./artifact/Regular/README.md
copy ./${{ env.BUILD_CONFIGURATION }}/CnCNet-Spawner.pdb ./artifact/Regular/CnCNet-Spawner.pdb
copy ./${{ env.BUILD_CONFIGURATION }}/CnCNet-Spawner.dll ./artifact/Regular/CnCNet-Spawner.dll
7z a ${{ env.ARTIFACT_NAME }}.zip ./artifact/Regular/*
mkdir ./artifact/HardEnd
copy ./LICENSE.md ./artifact/HardEnd/LICENSE.md
copy ./README.md ./artifact/HardEnd/README.md
copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/CnCNet-Spawner.pdb" ./artifact/HardEnd/CnCNet-Spawner.pdb
copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/CnCNet-Spawner.dll" ./artifact/HardEnd/CnCNet-Spawner.dll
7z a ${{ env.ARTIFACT_NAME }}-HardEnd.zip ./artifact/HardEnd/*
- name: Upload New Release
uses: softprops/action-gh-release@v2
with:
name: ${{ env.RELEASE_NAME }}
tag_name: ${{ env.RELEASE_NAME }}
body: ${{ env.RELEASE_NAME }}
append_body: true
draft: true
files: |
${{ env.ARTIFACT_NAME }}.zip
${{ env.ARTIFACT_NAME }}-HardEnd.zip
request-anti-cheat-build:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Request AntiCheat Build
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/cncnet/yrpp-spawner-private/actions/workflows/release-build-by-request.yml/dispatches \
-d '{"ref":"main", "inputs":{"tag": "${{ github.ref_name }}"}}'