diff --git a/.github/workflows/_reusable_build.yml b/.github/workflows/_reusable_build.yml
index 5d3cfa3..242f679 100644
--- a/.github/workflows/_reusable_build.yml
+++ b/.github/workflows/_reusable_build.yml
@@ -15,6 +15,10 @@ on:
type: string
default: snapshots::${{ vars.SNAPSHOTS_REPOSITORY_URL }}
description: Maven alternative repository to which the project artifacts should be deployed.
+ upload-release-asset:
+ type: boolean
+ default: false
+ description: Set to `true` to upload assets to the GitHub Release.
secrets:
BONITA_CI_PAT:
@@ -52,3 +56,7 @@ jobs:
if: ${{ inputs.publish }}
timeout-minutes: 60
run: ./mvnw -ntp deploy -DaltDeploymentRepository=${{ inputs.alt-deployment-repository }}
+
+ - name: Upload Github release asset
+ if: ${{ inputs.upload-release-asset }}
+ run: gh release upload ${{ inputs.ref }} ./target/bonita-application-directory-${{ inputs.ref }}.bos
diff --git a/.github/workflows/_reusable_tag.yml b/.github/workflows/_reusable_tag.yml
new file mode 100644
index 0000000..99ce7a5
--- /dev/null
+++ b/.github/workflows/_reusable_tag.yml
@@ -0,0 +1,49 @@
+name: Create Tag
+
+on:
+ workflow_call:
+ inputs:
+ version:
+ required: true
+ type: string
+ secrets:
+ BONITA_CI_PAT:
+ required: true
+ KSM_CONFIG:
+ required: true
+
+jobs:
+ create_tag:
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ repository: bonitasoft/bonita-application-directory
+ token: ${{ secrets.BONITA_CI_PAT }}
+
+ - name: Git Setup
+ uses: bonitasoft/git-setup-action@v1
+ with:
+ keeper-secret-config: ${{ secrets.KSM_CONFIG }}
+
+ - name: Create Release Branch
+ run: git checkout -B release/${{ inputs.version }}
+
+ - name: Change Version
+ run: ./mvnw versions:set -DnewVersion=${{ inputs.version }}
+
+ - name: Commit and Push Tag
+ run: |
+ git commit -a -m "release(${{ inputs.version }}) create release ${{ inputs.version }}"
+ git tag -a ${{ inputs.version }} -m "Release ${{ inputs.version }}"
+ git push origin ${{ inputs.version }}:${{ inputs.version }}
+
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.BONITA_CI_PAT }}
+ with:
+ tag_name: ${{ inputs.version }}
+ release_name: Release ${{ inputs.version }}
diff --git a/bos-distrib/pom.xml b/bos-distrib/pom.xml
index 2857e5c..74f4e74 100644
--- a/bos-distrib/pom.xml
+++ b/bos-distrib/pom.xml
@@ -5,7 +5,7 @@
4.0.0
${groupId}
${artifactId}
- ${application.version}
+ ${project.version}
${name}
${description}