-
Notifications
You must be signed in to change notification settings - Fork 18
46 lines (37 loc) · 1.43 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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
OPENSSL_INSTALL: 'C:\OpenSSL-Win32'
jobs:
windows-visual-studio:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Setup OpenSSL
run: |
curl -Lo "openssl-prebuilt-msvc.zip" https://github.com/DiscordMessenger/openssl/releases/download/release-1-msvc/openssl-prebuilt-msvc.zip
Expand-Archive -Path "openssl-prebuilt-msvc.zip" -DestinationPath "${{ env.OPENSSL_INSTALL }}" -Force
- name: Get latest tag
id: get-latest-tag
run: Write-Output "TAG=$(git describe --abbrev=0 --tags)" >> $Env:GITHUB_OUTPUT
- name: Build with Visual Studio
run: msbuild vs\DiscordMessenger.sln /p:Configuration=Release /p:Platform=x86 /p:OPENSSL_INSTALL="${{ env.OPENSSL_INSTALL }}"
- name: Copy required DLLs
run: Copy-Item -Path "$env:OPENSSL_INSTALL\libcrypto-3.dll", "$env:OPENSSL_INSTALL\libssl-3.dll" -Destination "bin\Release" -Force
- uses: actions/upload-artifact@v4
with:
name: 'DiscordMessenger-${{ steps.get-latest-tag.outputs.TAG }}-MSVC'
path: |
bin\Release\DiscordMessenger.exe
bin\Release\*.dll
bin\Release\*.pdb