This is an action that will often be triggered when a new tag is applied to the repo. For example, when a tag is added, create a version in MantisHub for the release.
To use this action in your GitHub workflow, add the following step to your workflow file:
The defaults for field are:
released
defaults totrue
.obsolete
defaults tofalse
.timestamp
defaults tonow
.
jobs:
create-version:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
repository: mantishub/action-create-version
- name: Create Version Action
id: create-version
uses: mantishub/action-create-version@v1
with:
url: https://example.mantishub.io
api-key: ${{ secrets.API_KEY }}
project: 'MyProject'
name: 'v1.1.13'
description: |
Release Version 1.1.13
For bugs fixes
released: false
obsolete: true
timestamp: '2025-09-20'
This workflow demonstrates how to use the action-create-version
in a GitHub Actions workflow to create a new version in a MantisHub project. The workflow checks out the code, runs the custom action, and retrieves the new version.
In the workflow below, the step Create Version Action
is assigned the ID create-version. Later, the output version-id generated by this step can be accessed using the syntax ${{ steps.create-version.outputs.version-id }}
in the Get new version id
step.
name: "MantisHub Example Workflow"
on:
workflow_dispatch:
jobs:
create-version:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
repository: mantishub/action-create-version
- name: Create Version Action
id: create-version
uses: mantishub/action-create-version@v1
with:
url: 'https://example.mantishub.io'
api-key: {{some-token}}
project: 'MyProject'
name: 'v1.1.13'
description: |
Release Version 1.1.13
For bugs fixes
released: false
obsolete: true
timestamp: '2025-09-20'
- name: Get new version id
run: echo ${{ steps.create-version.outputs.version-id }}