-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.13 KB
/
release.yml
File metadata and controls
45 lines (37 loc) · 1.13 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
name: "Plugin CI/CD"
on:
release:
types: [created]
permissions:
contents: write
jobs:
plugin:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: recursive
lfs: true
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: x86
- name: Compile plugin
run: |
cmake . --preset MP-Release
cmake --build --preset MP-Release
- name: Find plugin
run: |
$plugin_dll = Get-ChildItem *.dll -Recurse | Select-Object -First 1 -ExpandProperty FullName
$plugin_dll = $plugin_dll.Replace((Resolve-Path ".").Path + "\", "")
$plugin_dll = $plugin_dll.Replace("\", "/")
$plugin_asi = $plugin_dll.Replace(".dll", ".asi")
mv $plugin_dll $plugin_asi
echo "plugin_asi=$plugin_asi" >> $env:GITHUB_ENV
echo "Found plugin path: $plugin_asi"
- name: Upload plugin
uses: softprops/action-gh-release@v2
with:
body_path: changelog.md
files: ${{ env.plugin_asi }}