Skip to content

Download Mod

Download Mod #166

Workflow file for this run

name: Download Mod
on:
workflow_dispatch:
inputs:
gameVersion:
description: "Game Version"
type: choice
options:
- "1.16"
- "1.17"
- "1.18"
- "1.19"
required: true
curseforgeProjectID:
description: "CurseForge Project ID of the mod"
required: true
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download files
uses: RPMTW/Translation-Scripts@1.1.5
with:
action: "download_mod"
args: ${{ github.event.inputs.curseforgeProjectID }}
gameVersion: ${{ github.event.inputs.gameVersion }}
- name: Move files
run: |
if [ ! -d source ] ; then
mkdir source
fi
if [ ! -d source/zh_tw ] ; then
mkdir source/zh_tw
fi
if [ -d ${{ github.event.inputs.gameVersion }} ] ; then
cp -R -f ${{ github.event.inputs.gameVersion }}/* source/zh_tw/${{ github.event.inputs.gameVersion }}
rm -R ${{ github.event.inputs.gameVersion }}
fi
- name: Push changes
uses: github-actions-x/commit@v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: ${{ github.event.inputs.ref }}
commit-message: Upload source files
force-add: true
files: ./source
name: RPMTW Github Bot
email: 41898282+github-actions[bot]@users.noreply.github.com
rebase: true