diff --git a/.github/workflows/pipeline-release.yml b/.github/workflows/pipeline-release.yml index e007235..40e4e54 100644 --- a/.github/workflows/pipeline-release.yml +++ b/.github/workflows/pipeline-release.yml @@ -41,6 +41,14 @@ jobs: - run: unzip -qq artifact_${{github.run_number}}.zip -d artifact + - name: Write semantic Version in config file + uses: jacobtomlinson/gha-find-replace@v3 + with: + find: "" + replace: "{{ steps.version.outputs.version }}" + regex: false + include: "artifact/config.mjs" + - name: Archive Release for application uses: thedoctor0/zip-release@0.7.1 with: diff --git a/confernceUtils.mjs b/confernceUtils.mjs index 3c381a0..300717a 100644 --- a/confernceUtils.mjs +++ b/confernceUtils.mjs @@ -1,5 +1,5 @@ import {md5} from "js-md5"; -import {JITSI_ADMIN_URL} from "./config.mjs"; +import {BOT_VERSION, JITSI_ADMIN_URL} from "./config.mjs"; import gitRepoInfo from 'git-repo-info'; export class conferenceUtils { @@ -67,7 +67,7 @@ export class conferenceUtils { async getVersion(roomId) { const repoInfo = gitRepoInfo(); - this.client.sendText(roomId, 'Version: '+repoInfo.tag); + this.client.sendText(roomId, 'Version: '+BOT_VERSION); } } diff --git a/config.mjs b/config.mjs index bd9ecd0..7f88ff5 100644 --- a/config.mjs +++ b/config.mjs @@ -3,4 +3,5 @@ export var MATRIX_URL=process.env.MATRIX_URL || "https://matrix.org"; export var JITSI_ADMIN_URL =process.env.JITSI_ADMIN_URL || 'https://jitsi-admin.de'; export var MATRIX_USERNAME =process.env.MATRIX_USERNAME || 'h2inventbot'; export var MATRIX_PASSWORD =process.env.MATRIX_PASSWORD || 'xxxxxxxx'; -export var MATRIX_DISPLAYNAME =process.env.MATRIX_DISPLAYNAME || 'Raumassistent'; \ No newline at end of file +export var MATRIX_DISPLAYNAME =process.env.MATRIX_DISPLAYNAME || 'Raumassistent'; +export var BOT_VERSION =process.env.BOT_VERSION || ''; \ No newline at end of file