forked from RussellJerome/UnrealModLoader
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
179 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.* | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.create-gh-release.outputs.computed-prefix }}${{ steps.create-gh-release.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: create-gh-release | ||
uses: taiki-e/create-gh-release-action@v1 | ||
with: | ||
draft: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
upload-artifacts: | ||
needs: create-release | ||
strategy: | ||
matrix: | ||
config: [debug, release] | ||
gui: [gui, nogui] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup the build machine with the most recent versions of CMake and Ninja. Both are cached if not already: on subsequent runs both will be quickly restored from GitHub cache service. | ||
- uses: lukka/get-cmake@latest | ||
|
||
- uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Build artifacts | ||
uses: lukka/run-cmake@v10 | ||
with: | ||
configurePreset: windows-${{ matrix.config }}-${{ matrix.gui }} | ||
buildPreset: windows-${{ matrix.config }}-${{ matrix.gui }} | ||
|
||
- name: Upload dlls | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: out/build/windows-${{ matrix.config }}-${{ matrix.gui }}/UnrealCppLoader/UnrealCppLoader.dll | ||
asset_name: UnrealCppLoader-${{ matrix.gui }}-${{ matrix.config }}.dll | ||
tag: ${{ needs.create-release.outputs.tag }} | ||
|
||
- name: Upload pdbs | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: out/build/windows-${{ matrix.config }}-${{ matrix.gui }}/UnrealCppLoader/UnrealCppLoader.pdb | ||
asset_name: UnrealCppLoader-${{ matrix.gui }}-${{ matrix.config }}.pdb | ||
tag: ${{ needs.create-release.outputs.tag }} | ||
|
||
- name: Upload xinput1_3 | ||
if: matrix.config == 'release' && matrix.gui == 'nogui' | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: out/build/windows-${{ matrix.config }}-${{ matrix.gui }}/xinput1_3/xinput1_3.dll | ||
asset_name: xinput1_3.dll | ||
tag: ${{ needs.create-release.outputs.tag }} | ||
|
||
publish-release: | ||
needs: [create-release, upload-artifacts] | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: mark release as non-draft | ||
run: | | ||
gh release edit ${{ needs.create-release.outputs.tag }} --draft=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"version": 4, | ||
"configurePresets": [ | ||
{ | ||
"name": "windows-base", | ||
"description": "Target Windows with the Visual Studio development environment.", | ||
"hidden": true, | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/out/build/${presetName}", | ||
"installDir": "${sourceDir}/out/install/${presetName}", | ||
"cacheVariables": { | ||
"CMAKE_C_COMPILER": "cl.exe", | ||
"CMAKE_CXX_COMPILER": "cl.exe" | ||
} | ||
}, | ||
{ | ||
"name": "x64-debug", | ||
"displayName": "x64 Debug", | ||
"description": "Target Windows (64-bit) (Debug)", | ||
"hidden": true, | ||
"inherits": "windows-base", | ||
"architecture": { | ||
"value": "x64", | ||
"strategy": "external" | ||
}, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "x64-release", | ||
"displayName": "x64 Release", | ||
"description": "Target Windows (64-bit) (RelWithDebInfo)", | ||
"hidden": true, | ||
"inherits": "x64-debug", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "RelWithDebInfo" | ||
} | ||
}, | ||
|
||
{ | ||
"name": "windows-debug-nogui", | ||
"displayName": "Windows x64 Debug Nogui", | ||
"inherits": "x64-debug", | ||
"cacheVariables": { | ||
"ENABLE_GUI": "OFF" | ||
} | ||
}, | ||
{ | ||
"name": "windows-debug-gui", | ||
"displayName": "Windows x64 Debug Gui", | ||
"inherits": "x64-debug", | ||
"cacheVariables": { | ||
"ENABLE_GUI": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "windows-release-nogui", | ||
"displayName": "Windows x64 Release Nogui", | ||
"inherits": "x64-release", | ||
"cacheVariables": { | ||
"ENABLE_GUI": "OFF" | ||
} | ||
}, | ||
{ | ||
"name": "windows-release-gui", | ||
"displayName": "Windows x64 Release Gui", | ||
"inherits": "x64-release", | ||
"cacheVariables": { | ||
"ENABLE_GUI": "ON" | ||
} | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "windows-debug-nogui", | ||
"displayName": "Windows x64 Debug Nogui", | ||
"configurePreset": "windows-debug-nogui" | ||
}, | ||
{ | ||
"name": "windows-debug-gui", | ||
"displayName": "Windows x64 Debug Gui", | ||
"configurePreset": "windows-debug-gui" | ||
}, | ||
{ | ||
"name": "windows-release-nogui", | ||
"displayName": "Windows x64 Release Nogui", | ||
"configurePreset": "windows-release-nogui" | ||
}, | ||
{ | ||
"name": "windows-release-gui", | ||
"displayName": "Windows x64 Release Gui", | ||
"configurePreset": "windows-release-gui" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters