Skip to content

Automatic releases

Fröhlich A edited this page Jun 19, 2021 · 1 revision

Pax' CI system

Continuous Deployment

Continuous Deployment (CD) is a software release process that uses automated testing to validate if changes to a codebase are correct and stable for immediate autonomous deployment to a production environment.

A continous integration & deployment system can help you automate certain repetitive actions, such as exporting your modpack .zip, or uploading your modpack to Curseforge. Since PAX is a CLI-based application, automation is especially easy.

While PAX generally supports every CI system, a default CI config for the Github CI is included.

  • If you use Github, tag a commit with a name matching v* (for example v1.2.3 or v1.5.5-alpha) and push the tag, PAX will:
    • Automatically export your modpack to .zip.
    • Release your modpack on Github.
    • Upload your modpack to Curseforge (Some configuration needed).
      • If the tag contains -alpha, the modpack is uploaded as an alpha version.
      • If the tag contains -beta, the modpack is uploaded as a beta version.
      • If the tag only contains the version, the modpack is uploaded as a release version.

You are always free to modify your CI config to suit your style, and are more than welcome to come up with new and crazy ways to automate as much modpack development as possible ;)

Configuring Curseforge releases

Uploading your modpack to Curseforge is included in the default CI config for Github, but needs some additional configuration.

  • You will need a Github repository.
  • You will need a modpack page on Curseforge.
  1. Navigate to https://authors.curseforge.com/account/api-tokens. x
  2. Enter a name for your token and hit the "Generate Token" button. x
  3. Copy your generated secret (the jumbled mess of numbers, letters and dashes). x
  4. Navigate to the "Secrets" settings of your Github repository (https://github.com/{user}/{repository}/settings/secrets/actions). x
  5. Click on "New repository secret". For the name, enter CF_API_TOKEN. For the value, paste your previously copied secret. x
  6. Navigate to the Curseforge page of your project. x
  7. On the right side of the page, there is an "About" section which contains your Project ID (a number). Copy this ID. x
  8. Open an editor with the CI config file (located at .github/workflows/main.yml in your project folder). x
  9. Locate the PROJECT_ID env variable.
    env:
      PROJECT_ID: "123456"
  10. Change the value to your modpack project ID.
    env:
      PROJECT_ID: "443254" # If your Curseforge page shows 443254 as the Project ID.
Clone this wiki locally