You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

84 lines
2.2 KiB

name: Release Sandbox
permissions:
contents: read
on:
workflow_dispatch:
inputs:
app:
description: The changed app
type: string
default: pyTermTk
version:
description: The app version
type: string
default: v0.0.0
discord-message:
description: The release message
type: string
default: pyTermTk released
github-discussion-message:
description: The release message
type: string
default: pyTermTk released
workflow_call:
inputs:
app:
description: The changed app
type: string
default: pyTermTk
version:
description: The app version
type: string
default: v0.0.0
discord-message:
description: The release message
type: string
default: pyTermTk released
github-discussion-message:
description: The release message
type: string
default: pyTermTk released
jobs:
notify-discord:
name: Notify Discord
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Instrall deps
run: |
python -m pip install discord.py
- name: Deploy Discord message
env:
MESSAGE: ${{ inputs.discord-message }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
run: |
python tools/ci/social/notify_discord.py ${{ inputs.app }} ${{ inputs.version }}
notify-github-discussion:
name: Notify Github Discussion
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Deploy Github Discussion
env:
DISCUSSION_BODY: ${{ inputs.github-discussion-message}}
GH_DISCUSSION_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
run: |
export DISCUSSION_TITLE="${{ inputs.app }} ${{ inputs.version }} Released!!!"
python tools/ci/social/notify_github_discussion.py ${{ inputs.app }} ${{ inputs.version }}