Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci multi #3

Merged
merged 14 commits into from
Jun 19, 2024
Merged
64 changes: 60 additions & 4 deletions .github/workflows/createbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,70 @@ on:
branches: [master]

jobs:
Build:
Build_1_29:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
submodules: recursive
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Setup Nuget
uses: Nuget/setup-nuget@v1.0.5

- name: Restore nuget packages
run: nuget restore ${{ github.workspace }}/VoiceCommander.sln
- name: Initialize modding environment
uses: beat-forge/init-beatsaber@v1.1.0
with:
token: ${{ github.token }}
version: 1.29.0
- name: Download Mod Dependencies
uses: Goobwabber/download-beatmods-deps@1.2
with:
manifest: ${{ github.workspace }}/VoiceCommander/manifest.json
- name: Build
id: Build
run: msbuild ${{ github.workspace }}/VoiceCommander.sln /property:Configuration=Release
- name: GitStatus
run: git status
- name: Read variables from file and set outputs
id: set-outputs
shell: pwsh
run: |
$content = Get-Content -Path ${{ github.workspace }}/VoiceCommander/build_output.txt
foreach ($line in $content -split ';') {
$kvp = $line -split '='
$key = $kvp[0]
$value = $kvp[1]
Write-Output ("$key=$value") >> $env:GITHUB_ENV
Write-Output ("$key=$value") >> $env:GITHUB_OUTPUT
}
- name: Echo Filename
run: echo $BUILDTEXT $ASSEMBLYNAME $ARTIFACTPATH
env:
BUILDTEXT: Filename=${{ env.filename }}
ASSEMBLYNAME: AssemblyName=${{ env.assemblyname }}
ARTIFACTPATH: ArtifactPath=${{ env.artifactpath }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.filename }}
path: ${{ env.artifactpath }}
- name: Upload Release Asset
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release upload ${{ github.ref_name }} D:/a/VoiceCommander/VoiceCommander/VoiceCommander/bin/Release/zip/${{ env.filename }}.zip

Build_1_35:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: '1_35'
submodules: recursive
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
Expand Down Expand Up @@ -58,9 +117,6 @@ jobs:
with:
name: ${{ env.filename }}
path: ${{ env.artifactpath }}
#- name: List files
# run: Get-ChildItem -Path ./ -Recurse
# shell: pwsh
- name: Upload Release Asset
if: startsWith(github.ref, 'refs/tags/')
env:
Expand Down
Loading