-
Notifications
You must be signed in to change notification settings - Fork 22
69 lines (56 loc) · 2.47 KB
/
publish.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: publish
on:
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 21
uses: actions/setup-java@v2
with:
distribution: 'adopt-hotspot'
java-version: 21
cache: 'gradle'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build files
run: ./gradlew build
- name: read mod name, mod version and minecraft version
id: properties
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
properties: 'archives_base_name mod_version minecraft_version'
- uses: Kir-Antipov/[email protected]
with:
modrinth-featured: true
modrinth-unfeature-mode: subset
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
name: '${{ steps.properties.outputs.archives_base_name }}-${{ steps.properties.outputs.mod_version }}+${{ steps.properties.outputs.minecraft_version }}'
version: '${{ steps.properties.outputs.mod_version }}+${{ steps.properties.outputs.minecraft_version }}'
game-versions: |
${{ steps.properties.outputs.minecraft_version }}
version-type: release
version-resolver: exact
dependencies: |
fabric-api | depends | *
cloth-config | depends | *
changelog-file: CHANGELOG.md
retry-attempts: 2
retry-delay: 10000
fail-mode: fail
- name: read changelog
id: changelog
uses: juliangruber/read-file-action@v1
with:
path: 'CHANGELOG.md'
- name: discord webhook
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
embed-title: "${{ steps.properties.outputs.archives_base_name }} ${{ steps.properties.outputs.mod_version }} for Minecraft ${{ steps.properties.outputs.minecraft_version }} has been released!"
embed-description: "**Changelog**```md\n${{ steps.changelog.outputs.content }}```\n**Downloads**\n<:modrinth:1110118061106798644> https://modrinth.com/mod/${{ steps.properties.outputs.archives_base_name }}\n<:curseforge:1110124796362109028> https://www.curseforge.com/minecraft/mc-mods/${{ steps.properties.outputs.archives_base_name }}"
embed-footer-text: "Have fun and be blessed!"
embed-color: 0xFF8000