mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-13 02:53:51 +01:00
2.5 KiB
2.5 KiB
title: Creating Releases using Webhooks
What does this mean?
ContentDB offers the ability to automatically create releases using webhooks from either Github or Gitlab. If you're not using either of those services, you can also use the API to create releases.
The process is as follows:
- The user creates an API Token and a webhook to use it. This can be done automatically for Github.
- The user pushes a commit to the git host (Gitlab or Github).
- The git host posts a webhook notification to ContentDB, using the API token assigned to it.
- ContentDB checks the API token and issues a new releases.
This feature is in beta, and is only available for Trusted Members.
Setting up
Github (automatic)
- Go to your package page.
- Make sure that the repository URL is set to a Github repository. Only github.com is supported.
- Click "Set up a webhook to create releases automatically" below the releases panel on the side bar.
- Grant ContentDB the ability to manage Webhooks
GitHub (manual)
- Create an API Token by visiting your profile and clicking "API Tokens: Manage".
- Copy the access token that was generated.
- Go to the repository's settings > Webhooks > Add Webhook.
- Set the payload URL to
https://content.minetest.net/github/webhook/
- Set the content type to JSON.
- Set the secret to the access token that you copied.
- Set the events
- If you want a rolling release, choose "just the push event".
- Or if you want a stable release cycle based on tags, choose "Let me select" > Branch or tag creation.
GitLab (manual)
- Create an API Token by visiting your profile and clicking "API Tokens: Manage".
- Copy the access token that was generated.
- Go to the repository's settings > Integrations.
- Set the URL to
https://content.minetest.net/gitlab/webhook/
- Set the secret token to the access token that you copied.
- Set the events
- If you want a rolling release, choose "Push events".
- Or if you want a stable release cycle based on tags, choose "Tag push events".
Configuring
Setting minimum and maximum Minetest versions
This feature is unimplemented.
- Open up the conf file for the package.
This will be
game.conf
,mod.conf
,modpack.conf
, ortexture_pack.conf
depending on the content type. - Set
min_protocol
andmax_protocol
to the respective protocol numbers of the Minetest versions.- 0.4 = 32
- 5.0 = 37
- 5.1 = 38