Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(2722): Slack notifier on release workflows #2724

Merged
merged 3 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/actions/release-notifier/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'Release Notifier'

inputs:
os-name:
description: 'OS name (e.g. Linux, Android)'
required: true
version:
description: 'Semantic version string for this release (e.g. 4.0.0-alpha.0)'
required: true
status:
description: 'Final status of the release job (available values: success, failure, cancelled)'
required: true
slack_oauth_token:
description: 'OAuth token for our Slack bot'
required: true

runs:
using: composite
steps:
- name: 'Success Notification'
uses: actions-ecosystem/action-slack-notifier@v1
if: ${{ inputs.status == 'success' }}
with:
slack_token: ${{ inputs.slack_oauth_token }}
username: Github Actions
color: green
verbose: true
message: |
Release Success - `${{ inputs.os-name }} ${{ inputs.version }}`
channel: releases

- name: 'Failure Notification'
uses: actions-ecosystem/action-slack-notifier@v1
if: ${{ inputs.status == 'failure' }}
with:
slack_token: ${{ inputs.slack_oauth_token }}
username: Github Actions
color: red
verbose: true
message: |
Release Failed - `${{ inputs.os-name }} ${{ inputs.version }}`
channel: releases

- name: 'Cancelled Notification'
uses: actions-ecosystem/action-slack-notifier@v1
if: ${{ inputs.status == 'cancelled' }}
with:
slack_token: ${{ inputs.slack_oauth_token }}
username: Github Actions
color: yellow
verbose: true
message: |
Release Cancelled - `${{ inputs.os-name }} ${{ inputs.version }}`
channel: releases
68 changes: 47 additions & 21 deletions .github/workflows/desktop-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ jobs:
with:
submodules: 'recursive'

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
with:
path: packages/desktop

- name: Setup environment
uses: ./.github/actions/setup-env
with:
Expand Down Expand Up @@ -80,22 +86,25 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Get release version
id: package-version
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # main
with:
path: packages/desktop

- name: Upload Release Assets
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./packages/desktop/dist/Quiet-${{ steps.package-version.outputs.current-version}}.AppImage
asset_name: Quiet-${{ steps.package-version.outputs.current-version}}.AppImage
asset_path: ./packages/desktop/dist/Quiet-${{ steps.extract_version.outputs.current-version}}.AppImage
asset_name: Quiet-${{ steps.extract_version.outputs.current-version}}.AppImage
asset_content_type: application/.AppImage

- name: Send Release Notificaton
uses: ./.github/actions/release-notifier
if: always()
with:
os-name: Linux
version: ${{ steps.extract_version.outputs.current-version }}
status: ${{ job.status }}
slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }}

build-macos:
# needs: run-e2e-tests-mac
runs-on: macos-13
Expand All @@ -111,6 +120,12 @@ jobs:
with:
submodules: 'recursive'

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
with:
path: packages/desktop

- uses: actions-rs/components-nightly@254194ebf6ba07d2bb7cec8be76cee368d44fb90 # v1.1.1
with:
component: clippy
Expand Down Expand Up @@ -156,12 +171,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
with:
path: packages/desktop

- name: Upload Release Assets
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
Expand All @@ -172,6 +181,15 @@ jobs:
asset_name: Quiet-${{ steps.extract_version.outputs.version}}.dmg
asset_content_type: application/.dmg

- name: Send Release Notificaton
uses: ./.github/actions/release-notifier
if: always()
with:
os-name: MacOS
version: ${{ steps.extract_version.outputs.current-version }}
status: ${{ job.status }}
slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }}

build-windows:
# needs: run-e2e-tests-win
runs-on: windows-2019
Expand All @@ -187,6 +205,12 @@ jobs:
with:
submodules: 'recursive'

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
with:
path: packages/desktop

- name: "Fetch jsign"
shell: bash
run: cd packages/desktop && curl https://zbay-binaries.s3.us-east-2.amazonaws.com/jsign/jsign-2.1.jar --output ./jsign-2.1.jar
Expand Down Expand Up @@ -234,13 +258,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
with:
path: packages/desktop


- name: Upload Release Assets
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
env:
Expand All @@ -250,3 +267,12 @@ jobs:
asset_path: ./packages/desktop/dist/Quiet Setup ${{ steps.extract_version.outputs.version}}.exe
asset_name: Quiet Setup ${{ steps.extract_version.outputs.version}}.exe
asset_content_type: application/.exe

- name: Send Release Notificaton
uses: ./.github/actions/release-notifier
if: always()
with:
os-name: Windows
version: ${{ steps.extract_version.outputs.current-version }}
status: ${{ job.status }}
slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/mobile-build-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
with:
submodules: 'recursive'

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
with:
path: packages/mobile

- name: "Set up JDK"
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
with:
Expand Down Expand Up @@ -88,3 +94,12 @@ jobs:
asset_path: ./packages/mobile/android/app/build/outputs/apk/standard/release/app-standard-release.apk
asset_name: app-standard-release.apk
asset_content_type: application/.apk

- name: Send Release Notificaton
uses: ./.github/actions/release-notifier
if: always()
with:
os-name: Android (APK)
version: ${{ steps.extract_version.outputs.current-version }}
status: ${{ job.status }}
slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/mobile-deploy-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
with:
submodules: 'recursive'

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
with:
path: packages/mobile

- name: "Set up JDK"
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -125,3 +131,12 @@ jobs:
status: completed
track: internal
whatsNewDirectory: distribution/whatsnew

- name: Send Release Notificaton
uses: ./.github/actions/release-notifier
if: always()
with:
os-name: Android
version: ${{ steps.extract_version.outputs.current-version }}
status: ${{ job.status }}
slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/mobile-deploy-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
submodules: 'recursive'
lfs: true

- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@fdb5b74adc1278ddb777dfed4c988b9d098bb48d # v1.2.1
with:
path: packages/mobile

- name: Install gpg
run: brew install gnupg

Expand Down Expand Up @@ -90,3 +96,12 @@ jobs:
env:
APPSTORE_USER: ${{ secrets.APPSTORE_USER }}
APPSTORE_PASSWORD: ${{ secrets.APPSTORE_PASSWORD }}

- name: Send Release Notificaton
uses: ./.github/actions/release-notifier
if: always()
with:
os-name: IOS
version: ${{ steps.extract_version.outputs.current-version }}
status: ${{ job.status }}
slack_oauth_token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

* Add `trace` level logs to `@quiet/logger` ([#2716](https://github.com/TryQuiet/quiet/issues/2716))
* Refactor the `StorageService` and create `ChannelService`, `MessageService` and `ChannelStore` for handling channel-related persistence ([#2631](https://github.com/TryQuiet/quiet/issues/2631))
* Add slack notifications to release workflows ([#2722](https://github.com/TryQuiet/quiet/issues/2722))

## [3.0.0]

Expand Down
Loading