Files
Sunshine/.github/workflows/release-notifier-moonlight.yml
T
dependabot[bot] c9aa918b64 build(deps): bump actions/github-script from 8.0.0 to 9.0.0 (#4970)
build(deps): bump actions/github-script in /

Bumps [actions/github-script](https://github.com/actions/github-script) in `/` from 8.0.0 to 9.0.0.


Updates `actions/github-script` from 8.0.0 to 9.0.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/ed597411d8f924073f98dfc5c65a23a2325f34cd...3a2844b7e9c422d3c10d287c895573f7108da1b3)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github_actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 15:20:34 -04:00

40 lines
1.4 KiB
YAML

---
name: Release Notifications (Moonlight)
permissions: {}
on:
release:
types:
- released # this triggers when a release is published, but does not include prereleases or drafts
jobs:
discord:
if: github.repository_owner == 'LizardByte'
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Check if latest GitHub release
id: check-release
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const latestRelease = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
});
core.setOutput('isLatestRelease', latestRelease.data.tag_name === context.payload.release.tag_name);
- name: discord
if: steps.check-release.outputs.isLatestRelease == 'true'
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
with:
avatar_url: ${{ vars.ORG_LOGO_URL }}256
color: 0x${{ vars.COLOR_HEX_GREEN }}
description: ${{ github.event.release.body }}
nodetail: true
nofail: false
title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released
username: ${{ vars.DISCORD_USERNAME }}
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK_MOONLIGHT }}