Skip to content

create-release

create-release #37

name: create-release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version number'
required: true
defaults:
run:
shell: pwsh
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: setup-msbuild
uses: microsoft/[email protected]
- 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/[email protected]
with:
repository: "ThirteenAG/Ultimate-ASI-Loader"
latest: true
fileName: "Ultimate-ASI-Loader_x64.zip"
- name: Prepare Ultimate ASI Loader
run: |
unzip Ultimate-ASI-Loader_x64.zip -d .\
C:\msys64\usr\bin\wget.exe -O .\UltimateASILoader_LICENSE.md https://raw.githubusercontent.com/ThirteenAG/Ultimate-ASI-Loader/master/license
- name: Create Directory Structure
run: |
mkdir .\zip\Xbox\Project\Binaries\WinGDK
mkdir .\zip\Steam\Project\Binaries\Win64
# Xbox
- name: Prepare Xbox Files
run: |
cp ${{ github.event.repository.name }}.asi .\zip\Xbox\Project\Binaries\WinGDK\
cp ${{ github.event.repository.name }}.ini .\zip\Xbox\Project\Binaries\WinGDK\
cp dinput8.dll .\zip\Xbox\Project\Binaries\WinGDK\dsound.dll
cp UltimateASILoader_LICENSE.md .\zip\Xbox\Project\Binaries\WinGDK\
New-Item -Path ".\zip\Xbox\EXTRACT_TO_GAME_FOLDER" -ItemType File
- name: Create Xbox Zip
run: |
cd .\zip\Xbox
7z a -r -tzip ..\..\${{ github.event.repository.name }}_${{ github.event.inputs.version }}_Xbox.zip .\*
# Steam
- name: Prepare Steam Files
run: |
cp ${{ github.event.repository.name }}.asi .\zip\Steam\Project\Binaries\Win64\
cp ${{ github.event.repository.name }}.ini .\zip\Steam\Project\Binaries\Win64\
cp dinput8.dll .\zip\Steam\Project\Binaries\Win64\dsound.dll
cp UltimateASILoader_LICENSE.md .\zip\Steam\Project\Binaries\Win64\
New-Item -Path ".\zip\Steam\EXTRACT_TO_GAME_FOLDER" -ItemType File
- name: Create Steam Zip
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