f557d162b4
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
name: Notify on Release
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
jobs:
|
|
notify:
|
|
name: Send job complete notification
|
|
runs-on: ubuntu-latest
|
|
if: vars.DISCORD_RELEASE_WEBHOOK_ID || vars.DISCORD_WEBHOOK_ID
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Common Setup
|
|
uses: ./.github/actions/common-setup
|
|
|
|
- name: Retrieve Project Name
|
|
run: echo "PROJECT_NAME=$(${{github.workspace}}/gradlew -q printProjectName)" >> $GITHUB_ENV
|
|
id: project_name
|
|
|
|
- name: Set pre-release environment
|
|
if: ${{ github.event.release.prerelease }}
|
|
run: |
|
|
echo "RELEASE_TYPE=pre-release" >> $GITHUB_ENV
|
|
|
|
- name: Set release environment
|
|
if: ${{ !github.event.release.prerelease }}
|
|
run: |
|
|
echo "RELEASE_TYPE=release" >> $GITHUB_ENV
|
|
|
|
- name: Notify
|
|
uses: appleboy/discord-action@v1.2.0
|
|
with:
|
|
webhook_id: ${{ !github.event.release.prerelease && vars.DISCORD_RELEASE_WEBHOOK_ID || vars.DISCORD_WEBHOOK_ID }}
|
|
webhook_token: ${{ !github.event.release.prerelease && secrets.DISCORD_RELEASE_WEBHOOK_TOKEN || secrets.DISCORD_WEBHOOK_TOKEN }}
|
|
color: "#00FF00"
|
|
username: "${{ env.PROJECT_NAME }} Release Bot"
|
|
message: >
|
|
An ${{ env.PROJECT_NAME }} ${{ env.RELEASE_TYPE }} was deployed by ${{ github.actor }}:
|
|
https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}
|