-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (47 loc) · 1.55 KB
/
mbss.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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