This is an example of creating a new release and uploading artifacts using Keygen's distribution API.
First up, configure a few environment variables:
# Your Keygen product token. You can generate a product token via the API # or your admin dashboard. export KEYGEN_PRODUCT_TOKEN="A_KEYGEN_PRODUCT_TOKEN" # Your Keygen account ID. Find yours at https://app.keygen.sh/settings. export KEYGEN_ACCOUNT_ID="YOUR_KEYGEN_ACCOUNT_ID" # Your Keygen product ID. export KEYGEN_PRODUCT_ID="YOUR_KEYGEN_ACCOUNT_ID"You can either run each line above within your terminal session before starting the app, or you can add the above contents to your ~/.bashrc file and then run source ~/.bashrc after saving the file.
Next, install dependencies with pip:
pip install -r requirements.txt To create and upload a new release, run the program:
python main.py The script will create a new 1.0.0 release and then upload 2 artifacts:
examples/hello-world.txtexamples/hello-mars.txt
After uploading the artifacts, the release will be published.
Reach out at support@keygen.sh if you have any questions or concerns!