Skip to content

create-release

create-release #28

name: create-release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version number'
required: true
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: setup-msbuild
uses: microsoft/setup-msbuild@v1.1
- run: msbuild ${{ github.event.repository.name }}.sln -t:rebuild -verbosity:diag -property:Configuration=Release -property:Platform=x64
- run: cp x64\Release\${{ github.event.repository.name }}.asi ${{ github.event.repository.name }}.asi
- uses: robinraju/release-downloader@v1.8
with:
repository: "ThirteenAG/Ultimate-ASI-Loader"
latest: true
fileName: "Ultimate-ASI-Loader_x64.zip"
- run: unzip Ultimate-ASI-Loader_x64.zip -d .\; echo [GlobalSets]`nDontLoadFromDllMain=0 > .\dsound.ini; C:\msys64\usr\bin\wget.exe -O .\UltimateASILoader_LICENSE.md https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/master/license
- run: mkdir .\zip\Gamepass\P3R\Binaries\WinGDK; mkdir .\zip\Steam\P3R\Binaries\Win64
# Xbox
- run: cp ${{ github.event.repository.name }}.asi .\zip\Gamepass\P3R\Binaries\WinGDK\; cp ${{ github.event.repository.name }}.ini .\zip\Gamepass\P3R\Binaries\WinGDK\
- run: cp dsound.ini .\zip\Gamepass\P3R\Binaries\WinGDK\; cp dinput8.dll .\zip\Gamepass\P3R\Binaries\WinGDK\dsound.dll; cp UltimateASILoader_LICENSE.md .\zip\Gamepass\P3R\Binaries\WinGDK\; New-Item -Path ".\zip\Gamepass\EXTRACT_TO_GAME_FOLDER" -ItemType File
- run: cd .\zip\Gamepass; 7z a -r -tzip ..\..\${{ github.event.repository.name }}_${{ github.event.inputs.version }}_Xbox.zip .\*
# Steam
- run: cp ${{ github.event.repository.name }}.asi .\zip\Steam\P3R\Binaries\Win64\; cp ${{ github.event.repository.name }}.ini .\zip\Steam\P3R\Binaries\Win64\
- run: cp dsound.ini .\zip\Steam\P3R\Binaries\Win64\; cp dinput8.dll .\zip\Steam\P3R\Binaries\Win64\dsound.dll; cp UltimateASILoader_LICENSE.md .\zip\Steam\P3R\Binaries\Win64\; New-Item -Path ".\zip\Steam\EXTRACT_TO_GAME_FOLDER" -ItemType File
- run: cd .\zip\Steam; 7z a -r -tzip ..\..\${{ github.event.repository.name }}_${{ github.event.inputs.version }}_Steam.zip .\*
- uses: ncipollo/release-action@v1
with:
artifacts: "${{ github.event.repository.name }}_${{ github.event.inputs.version }}_Steam.zip, ${{ github.event.repository.name }}_${{ github.event.inputs.version }}_Xbox.zip"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.version }}
name: "${{ github.event.inputs.version }}"
draft: true
generateReleaseNotes: true
artifactErrorsFailBuild: true