-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.33 KB
/
announce_mod_update.yml
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
name: Announce Mod Update
run-name: Announce ${{ github.event.inputs.mod }} ${{ github.event.inputs.mod_version }} update on WurstForum
on:
workflow_dispatch:
inputs:
mod:
description: "Mod ID (as it appears in config.toml)"
required: true
mod_version:
description: "Mod version (without v or -MC)"
required: true
jobs:
announce:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: _scripts/requirements.txt
- name: Install dependencies
run: |
pip install -r _scripts/requirements.txt
- name: Run announce_mod_update.py
id: announce
env:
WURSTFORUM_TOKEN: ${{ secrets.WF_BOT_TOKEN }}
run: |
python _scripts/announce_mod_update.py "${{ github.event.inputs.mod }}" "${{ github.event.inputs.mod_version }}"
- name: Write summary
run: |
echo "Discussion ID: ${{ steps.announce.outputs.discussion_id }}" >> $GITHUB_STEP_SUMMARY
echo "Link: <https://wurstforum.net/d/${{ steps.announce.outputs.discussion_id }}>" >> $GITHUB_STEP_SUMMARY