From e877e65a1b2208513aefe42f89abc5ec1df42f49 Mon Sep 17 00:00:00 2001
From: Adrien Kantcheff <5028967+akantcheff@users.noreply.github.com>
Date: Wed, 13 Mar 2024 15:16:10 +0100
Subject: [PATCH 1/3] chore(bos-distrib): use project.version (#65)
---
bos-distrib/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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}
From 806ddfc2641a50eaac83e767caa5722eae059dc8 Mon Sep 17 00:00:00 2001
From: Bishal Thapaliya
Date: Wed, 13 Mar 2024 16:54:28 +0100
Subject: [PATCH 2/3] CI(tag): reusable tag (#69)
---
.github/workflows/_reusable_tag.yml | 49 +++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 .github/workflows/_reusable_tag.yml
diff --git a/.github/workflows/_reusable_tag.yml b/.github/workflows/_reusable_tag.yml
new file mode 100644
index 0000000..1aaa589
--- /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 }}
\ No newline at end of file
From c5ca0a0d438a3dc650b7365f60ed2a82e6cb8525 Mon Sep 17 00:00:00 2001
From: Adrien Kantcheff <5028967+akantcheff@users.noreply.github.com>
Date: Wed, 13 Mar 2024 17:41:01 +0100
Subject: [PATCH 3/3] ci(release): upload github release assets (#77)
---
.github/workflows/_reusable_build.yml | 8 ++++++++
.github/workflows/_reusable_tag.yml | 8 ++++----
2 files changed, 12 insertions(+), 4 deletions(-)
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
index 1aaa589..99ce7a5 100644
--- a/.github/workflows/_reusable_tag.yml
+++ b/.github/workflows/_reusable_tag.yml
@@ -11,7 +11,7 @@ on:
required: true
KSM_CONFIG:
required: true
-
+
jobs:
create_tag:
runs-on: ubuntu-22.04
@@ -34,11 +34,11 @@ jobs:
run: ./mvnw versions:set -DnewVersion=${{ inputs.version }}
- name: Commit and Push Tag
- run: |
+ 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
@@ -46,4 +46,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.BONITA_CI_PAT }}
with:
tag_name: ${{ inputs.version }}
- release_name: Release ${{ inputs.version }}
\ No newline at end of file
+ release_name: Release ${{ inputs.version }}