mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2025-02-17 11:08:41 +01:00
Manually trigger workflow
This commit is contained in:
parent
e02e4ae58f
commit
ca4f993aab
70
.github/workflows/build.yml
vendored
70
.github/workflows/build.yml
vendored
@ -17,6 +17,17 @@ on:
|
|||||||
- '**'
|
- '**'
|
||||||
tags-ignore:
|
tags-ignore:
|
||||||
- '**'
|
- '**'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
ref:
|
||||||
|
description: 'Commit'
|
||||||
|
required: true
|
||||||
|
config:
|
||||||
|
description: 'Configuration'
|
||||||
|
required: false
|
||||||
|
build_dir:
|
||||||
|
description: 'Build dir'
|
||||||
|
required: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SOLUTION_FILE_PATH: .
|
SOLUTION_FILE_PATH: .
|
||||||
@ -27,10 +38,25 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Print inputs
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "ref: ${{ github.event.inputs.ref }}"
|
||||||
|
echo "config: ${{ github.event.inputs.config }}"
|
||||||
|
echo "build_dir: ${{ github.event.inputs.build_dir }}"
|
||||||
|
|
||||||
- name: Checkout latest build and submodules
|
- name: Checkout latest build and submodules
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
if: github.event.inputs.ref == ''
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Checkout specific build and submodules
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
if: github.event.inputs.ref != ''
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.ref }}
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Add MSBuild to PATH
|
- name: Add MSBuild to PATH
|
||||||
uses: microsoft/setup-msbuild@v1.0.2
|
uses: microsoft/setup-msbuild@v1.0.2
|
||||||
@ -42,6 +68,17 @@ jobs:
|
|||||||
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
|
|
||||||
|
- name: Enable SimpleWindowSwitcher support for newer Windows SDKs
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd libs/sws
|
||||||
|
C:\msys64\usr\bin\wget.exe https://github.com/valinet/sws/commit/972acb76d1e6429133c92ed7cdefd29b9a2c6179.patch
|
||||||
|
C:\msys64\usr\bin\dos2unix.exe 972acb76d1e6429133c92ed7cdefd29b9a2c6179.patch
|
||||||
|
C:\msys64\usr\bin\dos2unix.exe SimpleWindowSwitcher/sws_def.h
|
||||||
|
C:\msys64\usr\bin\patch.exe -N SimpleWindowSwitcher/sws_def.h 972acb76d1e6429133c92ed7cdefd29b9a2c6179.patch
|
||||||
|
C:\msys64\usr\bin\unix2dos.exe SimpleWindowSwitcher/sws_def.h
|
||||||
|
exit /b 0
|
||||||
|
|
||||||
- name: Build funchook
|
- name: Build funchook
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
@ -53,20 +90,35 @@ jobs:
|
|||||||
cmake --build . --config Release
|
cmake --build . --config Release
|
||||||
|
|
||||||
- name: Build EP IA-32
|
- name: Build EP IA-32
|
||||||
|
if: github.event.inputs.config == ''
|
||||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||||
run: |
|
run: |
|
||||||
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=IA-32 ${{env.SOLUTION_FILE_PATH}}
|
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=IA-32 ${{env.SOLUTION_FILE_PATH}}
|
||||||
|
|
||||||
- name: Build EP amd64
|
- name: Build EP amd64
|
||||||
|
if: github.event.inputs.config == ''
|
||||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||||
run: |
|
run: |
|
||||||
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=amd64 ${{env.SOLUTION_FILE_PATH}}
|
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=amd64 ${{env.SOLUTION_FILE_PATH}}
|
||||||
|
|
||||||
|
- name: Build EP custom
|
||||||
|
if: github.event.inputs.config != ''
|
||||||
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||||
|
run: |
|
||||||
|
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{ github.event.inputs.config }} ${{env.SOLUTION_FILE_PATH}}
|
||||||
|
|
||||||
|
- name: Create expected build directory
|
||||||
|
if: github.event.inputs.build_dir != ''
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cp -r ${{ github.event.inputs.build_dir }}/Release build/Release
|
||||||
|
|
||||||
- name: Generate dxgi.dll
|
- name: Generate dxgi.dll
|
||||||
shell: powershell
|
shell: bash
|
||||||
working-directory: build/Release
|
working-directory: build/Release
|
||||||
run: |
|
run: |
|
||||||
Copy-Item ExplorerPatcher.amd64.dll dxgi.dll
|
if [[ -f "ExplorerPatcher.amd64.dll" ]]; then cp ExplorerPatcher.amd64.dll dxgi.dll; fi
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@ -78,7 +130,7 @@ jobs:
|
|||||||
- name: Generate release name
|
- name: Generate release name
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: build/Release
|
working-directory: build/Release
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=data::$(./ep_generate_release_name.exe)"
|
echo "::set-output name=data::$(./ep_generate_release_name.exe)"
|
||||||
id: release_name
|
id: release_name
|
||||||
@ -86,7 +138,7 @@ jobs:
|
|||||||
- name: Generate release notes
|
- name: Generate release notes
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: build/Release
|
working-directory: build/Release
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
|
||||||
run: |
|
run: |
|
||||||
MY_STRING=$(./ep_generate_release_description.exe ${{ steps.vars.outputs.sha_short }} ${{ steps.vars.outputs.branch }})
|
MY_STRING=$(./ep_generate_release_description.exe ${{ steps.vars.outputs.sha_short }} ${{ steps.vars.outputs.branch }})
|
||||||
MY_STRING="${MY_STRING//'%'/'%25'}"
|
MY_STRING="${MY_STRING//'%'/'%25'}"
|
||||||
@ -97,7 +149,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create/update release
|
- name: Create/update release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
|
||||||
id: create_release
|
id: create_release
|
||||||
with:
|
with:
|
||||||
draft: false
|
draft: false
|
||||||
@ -110,7 +162,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload dxgi.dll
|
- name: Upload dxgi.dll
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
with:
|
with:
|
||||||
@ -121,7 +173,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload ExplorerPatcher.amd64.dll
|
- name: Upload ExplorerPatcher.amd64.dll
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
with:
|
with:
|
||||||
@ -132,7 +184,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload ExplorerPatcher.IA-32.dll
|
- name: Upload ExplorerPatcher.IA-32.dll
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user