Skip to content

(OVERRIDE WARNING) Force release new revision #13

(OVERRIDE WARNING) Force release new revision

(OVERRIDE WARNING) Force release new revision #13

name: (OVERRIDE WARNING) Force release new revision
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
path: server-snap
- name: Set variables
id: prepare
working-directory: server-snap
shell: bash
run: |
track="${{ github.ref_name }}"
current_version=$(yq -e .version snap/snapcraft.yaml)
channels="${track}/edge,${track}/stable"
if [[ $current_version =~ rc ]]; then
channels+=",${track}/candidate"
fi
echo "channels: $channels"
echo "current_version: $current_version"
echo "channels=$channels" >>$GITHUB_OUTPUT
echo "current-version=$current_version" >>$GITHUB_OUTPUT
- name: 'Build the Snap package'
uses: snapcore/action-build@v1
id: snap-build
with:
path: server-snap
- name: 'Clone tests repository'
uses: actions/checkout@v3
with:
repository: debdutdeb/rocket.chat.tests
submodules: true
path: tests
- name: 'Run tests'
shell: bash
env:
ROCKETCHAT_TAG: ${{ steps.prepare.outputs.current-version }}
run: |
sudo apt-get --no-install-recommends install jo jq -y
export ROCKETCHAT_SNAP=$(realpath ${{ steps.snap-build.outputs.snap }})
cd tests &&
bash ./run_snap.bash
- name: 'Upload to snapstore'
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
with:
snap: ${{ steps.snap-build.outputs.snap }}
release: ${{ steps.prepare.outputs.channels }}
- name: 'Notify core team'
if: always()
uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master
with:
job_name: '*Snap ${{ steps.prepare.outputs.current-version }} publish*'
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
type: ${{ job.status }}
mention: 'debdut.chakraborty'
mention_if: failure