Skip to content

Yuzu: fix and hook up game version in metadata #17

Yuzu: fix and hook up game version in metadata

Yuzu: fix and hook up game version in metadata #17

Workflow file for this run

name: MSBuild
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: EmuLibrary.sln
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 20
- name: Get Version From Tag
id: get_version
uses: battila7/get-version-action@v2
- name: Update values.yaml
uses: fjogeleit/yaml-update-action@main
with:
valueFile: 'EmuLibrary/extension.yaml'
propertyPath: 'Version'
value: ${{steps.get_version.outputs.version-without-v}}
commitChange: false
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Rename Extension Package Prefix
uses: Amadevus/pwsh-script@v2
id: pkgrename
with:
script: |
Get-ChildItem -File -Path '*.pext' | ForEach-Object -Process {
$newFullPath = Join-Path -Path $_.DirectoryName -ChildPath ($_.Name -replace '^RomInstaller_', 'EmuLibrary_')
Move-Item -Path $_.FullName -Destination $newFullPath
}
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitMode: true
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: Release ${{steps.get_version.outputs.version}}
body: ${{steps.github_release.outputs.changelog}}
generate_release_notes: true
files: "*.pext"
fail_on_unmatched_files: true
token: ${{ secrets.GITHUB_TOKEN }}