From beef0cc5eeff76365142c4a685044c4cbaba931b Mon Sep 17 00:00:00 2001 From: AllanPazRibeiro Date: Tue, 17 Oct 2023 16:22:12 -0300 Subject: [PATCH 1/2] chore: support email and release workflow --- .github/workflows/package.yml | 74 +++++++++++++++++++++++++++++++++++ app.json | 4 +- 2 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/package.yml diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000..7bdbfca --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,74 @@ +# This workflow will be responsible to pack the app (compiled and not compiled version) to be added as asset on the release +name: Package App +# L4-L7 - This section is the push tags trigger that will run the package job +on: + workflow_dispatch: + push: + tags: + - '*' + release: + types: [published] + +permissions: + contents: write +# This is the main job that will be running in a virtual machine (ubuntu) +jobs: + package: + runs-on: ubuntu-latest + + steps: + # L21-L25 This is the checkout step wich is responsible authenticate the workflow + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + ssh-key: '${{ secrets.COMMIT_KEY }}' + # L26-L31 This will set all properties from the app.json to github action env variables + - name: JSON to variables + uses: antifree/json-to-variables@v1.0.1 + with: + filename: 'app.json' + prefix: app + # L33-L36 Setup the nodejs version + - name: Setup Node.js environment + uses: actions/setup-node@v2.1.2 + with: + node-version: '12' + # L40-L41 Install the dependencies + - name: Install dependencies + run: npm i + # L43-L44 Install the apps cli + - name: Install Rocket.Chat Apps cli + run: npm i -g @rocket.chat/apps-cli + # L46-L47 Pack the app (compiled) + - name: Bundle App Compiled + run: rc-apps package + # L49-L50 Renames the pack (compiled) + - name: Renaming Package Name + run: cd dist && mv ${{ env.app_nameSlug }}_${{ env.app_version }}.zip ${{ env.app_nameSlug }}_${{ env.app_version }}-compiled.zip + # L52-L53 Pack the app (not compiled) + - name: Bundle App Not Compiled + run: rc-apps package --no-compile + # L55-L56 Renames the pack (not compiled) + - name: Renaming Not Compiled Package Name + run: cd dist && mv ${{ env.app_nameSlug }}_${{ env.app_version }}.zip ${{ env.app_nameSlug }}_${{ env.app_version }}-not-compiled.zip + # L58-L76 Uploads both compiled and not compiled files inside the release + - name: Upload BBB Compiled + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/${{ env.app_nameSlug}}_${{ env.app_version }}-compiled.zip + asset_name: ${{ env.app_nameSlug}}_${{ env.app_version }}-compiled.zip + tag: ${{ env.app_version }} + overwrite: true + body: ${{ github.event.release.body }} + + - name: Upload BBB Not Compiled + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/${{ env.app_nameSlug }}_${{ env.app_version }}-not-compiled.zip + asset_name: ${{ env.app_nameSlug }}_${{ env.app_version }}-not-compiled.zip + tag: ${{ env.app_version }} + overwrite: true + body: ${{ github.event.release.body }} \ No newline at end of file diff --git a/app.json b/app.json index 9e3ae37..f6d41dd 100644 --- a/app.json +++ b/app.json @@ -1,12 +1,12 @@ { "id": "c95ba73a-0485-4d12-ae8a-a3e68330065a", - "version": "1.0.6", + "version": "1.0.7", "requiredApiVersion": "^1.33.0", "iconFile": "icon.png", "author": { "name": "Rocket.Chat Technologies Corp.", "homepage": "https://github.com/RocketChat/Rocket.Chat", - "support": "https://github.com/RocketChat/Rocket.Chat" + "support": "support@rocket.chat" }, "name": "Big Blue Button", "nameSlug": "bigbluebutton", From a998f63e43121475d211c96a08c55e834a9bda0b Mon Sep 17 00:00:00 2001 From: Allan RIbeiro <35040806+AllanPazRibeiro@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:52:29 -0300 Subject: [PATCH 2/2] changing the app homepage --- app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.json b/app.json index f6d41dd..af81303 100644 --- a/app.json +++ b/app.json @@ -5,7 +5,7 @@ "iconFile": "icon.png", "author": { "name": "Rocket.Chat Technologies Corp.", - "homepage": "https://github.com/RocketChat/Rocket.Chat", + "homepage": "rocket.chat", "support": "support@rocket.chat" }, "name": "Big Blue Button",