generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
35 lines (35 loc) · 1.11 KB
/
action.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
name: "ModLoaderTools"
description: "Tools for building a tModLoader mod with GitHub Actions."
author: "Chireiden"
inputs:
command:
description: 'The command to execute. "setup", "publish"'
default: "setup"
path:
description: "The path of tModLoader"
default: "./"
mod:
description: "The file of the mod (publish only)."
default: ""
steamid:
description: "Author steamid (publish only)."
default: ""
password:
description: "Password (publish only)."
default: ""
runs:
using: composite
steps:
- id: setup
name: "Setup tModLoader"
shell: pwsh
run: |
$repo = "tModLoader/tModLoader"
$filename = "tModLoader.zip"
$url = $(Invoke-WebRequest https://api.github.com/repos/$repo/releases | ConvertFrom-Json)
Invoke-WebRequest -Uri $url.assets[1].browser_download_url -OutFile $filename
Expand-Archive -Path $filename -DestinationPath ${{ inputs.path }}
Rename-Item -Path $(Join-Path -Path ${{ inputs.path }} -ChildPath tMLMod.targets) -NewName tModLoader.targets
branding:
icon: "arrow-down-circle"
color: "green"