-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.95 KB
/
release.yml
File metadata and controls
60 lines (51 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Release Geode Mod
on:
push:
tags:
- "v*"
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Check for Discord webhook URL
id: check-discord
run: |
if [ -n "${{ secrets.RELEASE_WEBHOOK }}" ]; then
echo "webhook-url=${{ secrets.RELEASE_WEBHOOK }}" >> $GITHUB_OUTPUT
echo "has-webhook=true" >> $GITHUB_OUTPUT
echo "Using RELEASE_WEBHOOK"
elif [ -n "${{ secrets.NIGHTLY_WEBHOOK }}" ]; then
echo "webhook-url=${{ secrets.NIGHTLY_WEBHOOK }}" >> $GITHUB_OUTPUT
echo "has-webhook=true" >> $GITHUB_OUTPUT
echo "Using NIGHTLY_WEBHOOK"
else
echo "has-webhook=false" >> $GITHUB_OUTPUT
echo "No webhook configured"
fi
- name: Publish release
id: publish-release
uses: BlueWitherer/release-geode-mod@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: build.yml
- name: Send Discord webhook
if: ${{ steps.check-discord.outputs.has-webhook == 'true' }}
uses: BlueWitherer/mod-discord-webhooks/geode@main
with:
webhook-url: ${{ steps.check-discord.outputs.webhook-url }}
content: "-# @everyone"
changelog: ${{ steps.publish-release.outputs.changelog }}
publish:
name: Publish to Geode
runs-on: ubuntu-latest
needs: ["release"]
steps:
- uses: actions/checkout@v6
- name: Publish to Geode
uses: hiimjasmine00/release-geode-mod/publish@main
with:
token: ${{ secrets.GITHUB_TOKEN }}