chore: ??? #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MBSS | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} | |
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} | |
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | |
jobs: | |
mbss: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Download MBSS | |
run: | | |
$url = "https://api.github.com/repos/beat-forge/MBSS/releases/latest" | |
$response = Invoke-RestMethod -Uri $url | |
$response.assets | ForEach-Object { | |
if ($_.name -like "*MBSS*.zip") { | |
$url = $_.browser_download_url | |
Invoke-WebRequest -Uri $url -OutFile "MBSS.zip" | |
} | |
} | |
- name: Remove existing bin directory | |
run: | | |
if (Test-Path -Path bin) { | |
Remove-Item -Recurse -Force -Path bin | |
} | |
- name: Create bin directory | |
run: New-Item -ItemType Directory -Path bin | |
- name: Unzip MBSS to bin directory | |
run: | | |
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
[System.IO.Compression.ZipFile]::ExtractToDirectory("MBSS.zip", "bin", $true) | |
- name: Start MBSS | |
if: ${{ !contains(github.event.head_commit.message, ':reset') }} | |
run: ./bin/MBSS.exe | |
- name: Start MBSS and reset | |
if: ${{ contains(github.event.head_commit.message, ':reset') }} | |
run: ./bin/MBSS.exe --reset |