### Prepare Release Metadata for Wago Addons API Source: https://docs.wago.io/index This JSON object represents the metadata required for a new release upload to Wago Addons. It includes the release label, stability, changelog, and supported game patch versions. At least one game property must be included. ```json { "label": "1.2.3", // replace with your release name "stability": "stable", // one of: stable, beta, alpha "changelog": "#Changelog...", // your release changelog as a markdown string // You have to add at least one of the following game properties. "supported_retail_patch": "9.1.0", "supported_wotlk_patch": "3.4.0", "supported_bc_patch": "2.5.1", "supported_classic_patch": "1.13.7" } ``` -------------------------------- ### Send Release Upload Request to Wago Addons API (cURL) Source: https://docs.wago.io/index This cURL command demonstrates how to send an HTTP POST request to the Wago Addons API to upload a new release. It includes the metadata, the release file, and the authorization header with the API key. Replace `` and `` with your specific values. ```http curl -f -X POST \ -F "metadata=$METADATASTRING \ -F "file=@" \ -H "authorization: Bearer $WAGO_API_KEY" -H "accept: application/json" \ https://addons.wago.io/api/projects//version ``` -------------------------------- ### Configure GitHub Actions for BigWigs Packager Source: https://docs.wago.io/index This snippet demonstrates how to configure a GitHub Actions workflow to use the BigWigs packager and authenticate with Wago Addons using a WAGO_API_TOKEN secret. This automates addon releases to Wago Addons upon repository pushes. ```yaml - name: Create Package uses: BigWigsMods/packager@master env: # This section might already create other env variables, just append the WAGO_API_TOKEN to these WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} ``` -------------------------------- ### Manual API Integration - Upload Release Source: https://docs.wago.io/index Manually upload addon releases via the Wago Addons API using a multipart form request. This involves preparing metadata and sending the release file and metadata to the specified endpoint. ```APIDOC # Manual API integration In case you are not using the packager and want to automate the upload of your releases via API Wago Addons offers a convenient multipart form API for you to use. ## Prepare the metadata ```json { "label": "1.2.3", // replace with your release name "stability": "stable", // one of: stable, beta, alpha "changelog": "#Changelog...", // your release changelog as a markdown string // You have to add at least one of the following game properties. "supported_retail_patch": "9.1.0", "supported_wotlk_patch": "3.4.0", "supported_bc_patch": "2.5.1", "supported_classic_patch": "1.13.7" } ``` The API expects release metadata to be a JSON string in one of the properties. The JSON object looks like show in the code example. You can find all available patch versions using our API at https://addons.wago.io/api/data/game. Generally we follow Blizzard's SemVer versioning of the WoW client. With the upcoming addition of multi interface support we already allow to publish addons to target all the game flavors. You can find a detailed explanation of this here. However, if you prefer to publish separate artifacts for the different game flavors please send a separate release upload request per targeted client. ## Sending the upload request ### HTTP Request ```bash curl -f -X POST \ -F "metadata=$METADATASTRING \ -F \"file=@\" \ -H \"authorization: Bearer $WAGO_API_KEY\" -H \"accept: application/json\" https://addons.wago.io/api/projects//version ``` `POST https://addons.wago.io/api/projects//version` ### Headers | Name | Value | Description |---|---|--- | Authorization | Your Wago Addons API token | You can find your token here. | Accept | application/json | This should be set to your preferred response Content-Type, typically `application/json`. ### Parameters | Name | Value |---|--- | file | The release file | metadata | The JSON object described above as string http ``` -------------------------------- ### BigWigs Packager Integration Source: https://docs.wago.io/index Integrate your addon releases with Wago Addons using the BigWigs packager. This involves adding your Project ID to your .toc file and configuring GitHub Actions or environment variables with your API token. ```APIDOC ## BigWigs packager The easiest way to automate releasing your addon to Wago Addons is using the BigWigs packager. It's an extremely handy tool that helps you with even more automation than just releases, please visit their documentation to get started. Once you're set up with the packager adding Wago as a release target is incredibly easy. ### Adding the Wago Project ID > Add the following line anywhere in your .toc file. ``` ## X-Wago-ID: as3Dfg57 ``` As a first step you need to add your addon's project id to your `.toc` file. You can find this ID on your developer dashboard, it's printed directly beneath your addon's name and should be an 8-digit alpha numeric string. ### GitHub actions ``` - name: Create Package uses: BigWigsMods/packager@master env: # This section might already create other env variables, just append the WAGO_API_TOKEN to these WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} ``` If you are using the packager with GitHub action please add a secret to your GitHub repository settings that you call `WAGO_API_TOKEN`. Once you've done that edit your GitHub Actions workflow file to export the necessary env variable. Check out the attached code example. That's it, now upon the next push to your repository the packager will start publishing releases to Wago Addons as well! ### Running the packager ``` export WAGO_API_TOKEN="IAmAKey" ``` In order to access your addon project trough our API you need to configure the packager to use your API key. To do that you simply export the `WAGO_API_TOKEN` environment variable containing the key. ``` -------------------------------- ### Export WAGO_API_TOKEN Environment Variable Source: https://docs.wago.io/index This snippet shows how to export the WAGO_API_TOKEN environment variable, which is necessary for the BigWigs packager to authenticate with the Wago Addons API. This allows programmatic access to upload addon projects. ```bash export WAGO_API_TOKEN="IAmAKey" ``` -------------------------------- ### Authentication Source: https://docs.wago.io/index Wago Addons uses API keys for authentication. Include your API key in the Authorization header as a Bearer token for all API requests. ```APIDOC ## Authentication Wago Addons uses API keys to allow access to the API. You can generate a new API key at our developer portal. Wago Addons expects for the API key to be included in all API requests to the server in a header that looks like the following: `Authorization: Bearer IAmAKey` You must replace `IAmAKey` with your personal API key. ``` -------------------------------- ### Add Project ID to .toc file Source: https://docs.wago.io/index This snippet shows how to add your addon's Wago Project ID to the .toc file. This is a required step for identifying your addon when using the BigWigs packager. ```toc ## X-Wago-ID: as3Dfg57 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.