mirror of https://github.com/BUTR/workflows.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.1 KiB
YAML
77 lines
2.1 KiB
YAML
name: Release Module on Steam
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
workshop_id:
|
|
required: true
|
|
type: number
|
|
default: -1
|
|
mod_id:
|
|
required: true
|
|
type: string
|
|
mod_description:
|
|
required: false
|
|
type: string
|
|
default: ''
|
|
artifact_name:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
STEAM_LOGIN:
|
|
required: true
|
|
STEAM_AUTH_CODE:
|
|
required: true
|
|
STEAM_PASSWORD:
|
|
required: true
|
|
|
|
jobs:
|
|
publish-on-steam:
|
|
name: Publish Module on Steam
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Setup
|
|
uses: butr/actions-common-setup@v2.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Download Module artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: ${{ inputs.artifact_name }}
|
|
path: ./artifact
|
|
|
|
- name: Install Bannerlord.ChangelogParser
|
|
if: ${{ inputs.mod_description == '' }}
|
|
run: dotnet tool install -g Bannerlord.ChangelogParser;
|
|
shell: pwsh
|
|
|
|
- name: Set Description
|
|
id: set_description
|
|
run: |
|
|
if ${{ inputs.mod_description == '' }}
|
|
then
|
|
desc="$(bannerlord_changelog_parser fulldescription -f "$PWD/changelog.txt")"
|
|
desc="${desc//'%'/'%25'}"
|
|
desc="${desc//$'\n'/'%0A'}"
|
|
desc="${desc//$'\r'/'%0D'}"
|
|
echo "::set-output name=mod_description::$desc"
|
|
else
|
|
desc="${{ inputs.mod_description }}"
|
|
desc="${desc//'%'/'%25'}"
|
|
desc="${desc//$'\n'/'%0A'}"
|
|
desc="${desc//$'\r'/'%0D'}"
|
|
echo "::set-output name=mod_description::$desc"
|
|
fi
|
|
|
|
- uses: CyberAndrii/setup-steamcmd@v1
|
|
|
|
- name: Install Bannerlord.SteamWorkshop
|
|
run: dotnet tool install -g Bannerlord.SteamWorkshop;
|
|
shell: pwsh
|
|
|
|
- run: |
|
|
bannerlord_steam_workshop loginandpublish -l "${{ secrets.STEAM_LOGIN }}" -p "${{ secrets.STEAM_PASSWORD }}" -t ${{ secrets.STEAM_AUTH_CODE }} -f "${{ inputs.workshop_id }}" -c "${{ github.workspace }}/artifact/Modules/${{ inputs.mod_id }}" -d "${{ steps.set_description.outputs.mod_description }}";
|
|
shell: pwsh
|