A demonstration repository showing how to automate mod uploads to NexusMods using GitHub Actions.
This repository provides a working example of the Nexus-Mods/upload-action GitHub Action. It demonstrates how to set up automated workflows that package and upload mods to NexusMods whenever you trigger the workflow.
The workflow in .github/workflows/upload-mod.yaml:
- Checks out the repository (with full history so the changelog can be built)
- Generates a changelog from the current date and the 10 most recent commits
- Zips the contents of the
src/directory - Uploads the zip file to NexusMods using their API, including the generated changelog for the version
To use this workflow in your own project, you'll need to configure the following:
NEXUSMODS_API_KEY- Your NexusMods API key
NEXUSMODS_FILE_ID- The File ID for your mod on NexusModsNEXUSMODS_MOD_ID- The Mod ID for your mod on NexusMods (required to add a changelog)
-
Copy
.github/workflows/upload-mod.yamlto your own repository -
Modify the workflow to zip your mod files (update the
zipcommand as needed) -
Configure the required secrets and variables in your repository settings
-
Trigger the workflow using one of the following methods:
- Create a release - The workflow runs automatically and uses the release tag as the version
- Manual trigger - Go to the Actions tab, select the workflow, and enter a version number
In both cases the changelog is generated automatically from the current date and recent commits.
MIT License - see LICENSE for details.