Skip to content

fix: Remove existing bin directory to prevent file conflicts during e… #17

fix: Remove existing bin directory to prevent file conflicts during e…

fix: Remove existing bin directory to prevent file conflicts during e… #17

Workflow file for this run

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: Expand-Archive -Path MBSS.zip -DestinationPath ./bin -Force
- 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