Skip to content

Commit

Permalink
Merge pull request #9 from RocketChat/AECO-343-change-all-the-support…
Browse files Browse the repository at this point in the history
…-links-rocket-chat-to-support-rocket-chat

chore: support email and release workflow
  • Loading branch information
casalsgh authored Oct 20, 2023
2 parents cd59215 + a998f63 commit f1466d2
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 3 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
filename: 'app.json'
prefix: app
# L33-L36 Setup the nodejs version
- name: Setup Node.js environment
uses: actions/[email protected]
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 }}
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
@@ -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"
"homepage": "rocket.chat",
"support": "[email protected]"
},
"name": "Big Blue Button",
"nameSlug": "bigbluebutton",
Expand Down

0 comments on commit f1466d2

Please sign in to comment.