Skip to content
Draft
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
19 changes: 19 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: notify on release
on:
release:
types: [released]

jobs:
notify:
name: Notify the stable channel
runs-on: ubuntu-20.04
steps:
- name: Send notification to Discord
uses: ./.github/actions/discord-send
with:
channel: ${{ secrets.DISCORD_STABLE_CHANNEL_ID }}
token: ${{ secrets.DISCORD_STABLE_CHANNEL_TOKEN }}
title: New Toltec stable update available
link: ${{ github.event.release.url }}
color: 0x2ea043
message: ${{ github.event.release.body }}
19 changes: 6 additions & 13 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Create Github Release
continue-on-error: true
run: |
sudo apt-get update && sudo apt-get install -y hub
hub release create -t $SHA -m $MESSAGE $(date +%G-W%V-%u)
gh release create \
--draft \
--target "$SHA" \
--title "$(echo $MESSAGE | head -n 1)" \
--notes "$(echo $MESSAGE | tail -n +2)" \
$(date +%G-W%V-%u)
env:
SHA: ${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
MESSAGE: ${{ github.event.commits[0].message }}
- name: Send notification to Discord
continue-on-error: true
uses: ./.github/actions/discord-send
with:
channel: ${{ secrets.DISCORD_STABLE_CHANNEL_ID }}
token: ${{ secrets.DISCORD_STABLE_CHANNEL_TOKEN }}
title: New Toltec stable update available
link: https://toltec-dev.org/stable
color: 0x2ea043
message: ${{ github.event.commits[0].message }}