Skip to content

Xenius97/mtasa-update-workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MTA SA Binary Update Workflow

This repository updates MTA:SA Windows x64 server binaries.

How The Updater Works

The updater script does the following:

  1. Reads the nightly MTA build index from https://nightly.multitheftauto.com/.
  2. Finds the newest matching mtasa_x64-{VERSION}*.exe build.
  3. Downloads the installer.
  4. Extracts files with 7-Zip.
  5. Copies MTA Server64.exe and x64/ content into updater/binaries/.
  6. Removes temporary download/extraction files.

The target version is controlled in updater/update_server_win64.py:

  • VERSION = "1.6" (or change to "1.7")

Local Setup (Manual)

Requirements

  • Python 3.10+
  • 7-Zip available for your OS:
    • Windows: updater/vendor/7z.exe
    • Linux: 7z command from p7zip-full
  • Python packages:
    • requests
    • beautifulsoup4

Install Python dependencies

From repository root:

pip install requests beautifulsoup4

Run updater manually

From repository root:

python updater/update_server_win64.py

Or on Windows:

updater\update_server_win64.bat

After a successful run, updated files are written to:

  • updater/binaries/MTA Server64.exe
  • updater/binaries/x64/

GitHub Actions Workflow Setup

Workflow file:

  • .github/workflows/update-mta-binaries.yml

Current trigger mode:

  • manual only (workflow_dispatch)
  • scheduled trigger is intentionally left commented in the workflow

Required repository secret

Create this secret in your GitHub repository settings:

  • PAT_TOKEN: Personal Access Token used by peter-evans/create-pull-request

Recommended token scopes (fine-grained or classic equivalent):

  • repository contents: read/write
  • pull requests: read/write

GITHUB_TOKEN is provided automatically by GitHub Actions for checkout/commit operations.

Run workflow manually

  1. Open your repository on GitHub.
  2. Go to Actions.
  3. Select Update MTA SA Server Binaries.
  4. Click Run workflow.

If binary changes are detected, the workflow commits updates and opens/updates a pull request.

Re-enable Scheduled Automation (Optional)

If you want automatic daily runs again, uncomment in .github/workflows/update-mta-binaries.yml:

on:
  workflow_dispatch:
  schedule:
    - cron: "0 6 * * *"

This example runs every day at 06:00 UTC.

Notes

  • Keep binary updates in a dedicated PR branch (already configured by workflow).
  • If the nightly site structure changes, you may need to adjust matching logic in fetch_exe_url().
  • If extraction fails on Linux runners, ensure p7zip-full is installed.

About

Multi Theft Auto x64 Server Auto-Updater based on Fernando's script.

Resources

License

Stars

Watchers

Forks