chore: update global workflows (#3813)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
19
.github/workflows/release-notifier-moonlight.yml
vendored
19
.github/workflows/release-notifier-moonlight.yml
vendored
@@ -1,5 +1,6 @@
|
||||
---
|
||||
name: Release Notifications (Moonlight)
|
||||
permissions: {}
|
||||
|
||||
on:
|
||||
release:
|
||||
@@ -8,13 +9,23 @@ on:
|
||||
|
||||
jobs:
|
||||
discord:
|
||||
if: >-
|
||||
startsWith(github.repository, 'LizardByte/') &&
|
||||
!github.event.release.prerelease &&
|
||||
!github.event.release.draft
|
||||
if: github.repository_owner == 'LizardByte'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if latest GitHub release
|
||||
id: check-release
|
||||
uses: actions/github-script@v7
|
||||
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@v1
|
||||
with:
|
||||
avatar_url: ${{ vars.ORG_LOGO_URL }}256
|
||||
|
||||
Reference in New Issue
Block a user