-
Notifications
You must be signed in to change notification settings - Fork 36
52 lines (45 loc) · 1.79 KB
/
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
name: Build
on: [push, pull_request]
jobs:
build:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: windows-2022
permissions:
contents: write # Allow job to create a release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1
- name: Build (x64)
run: |
mkdir package\x64\plugins
cmake -B build64 -A x64
cmake --build build64 --config Release
copy build64\Release\*.dp64 package\x64\plugins\
- name: Build (x32)
run: |
mkdir package\x32\plugins
cmake -B build32 -A Win32
cmake --build build32 --config Release
copy build32\Release\*.dp32 package\x32\plugins\
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-${{ github.sha }}
path: package/
- name: Compress artifacts
uses: vimtor/action-zip@26a249fb00d43ca98dad77a4b3838025fc226aa1 # v1.1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
files: package/
dest: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-pre') }}
files: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}