-
Notifications
You must be signed in to change notification settings - Fork 13
51 lines (49 loc) · 1.66 KB
/
release.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
name: Java CI with Gradle
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.0.0
- name: Set up JDK
uses: actions/setup-java@v3.0.0
with:
distribution: adopt
java-version: 17
- name: Build FastMOTD
run: ./gradlew build
- name: Upload FastMOTD
uses: actions/upload-artifact@v3.0.0
with:
name: FastMOTD
path: "build/libs/FastMOTD*.jar"
- name: Find correct JAR
id: find-jar
run: |
output="$(find build/libs/ ! -name "*-javadoc.jar" ! -name "*-sources.jar" -type f -printf "%f\n")"
echo "::set-output name=jarname::$output"
- name: Upload to the GitHub release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: build/libs/${{ steps.find-jar.outputs.jarname }}
asset_name: ${{ steps.find-jar.outputs.jarname }}
asset_content_type: application/java-archive
- name: Upload to Modrinth
uses: RubixDev/modrinth-upload@v1.0.0
with:
token: ${{ secrets.MODRINTH_TOKEN }}
file_path: build/libs/${{ steps.find-jar.outputs.jarname }}
name: Release ${{ github.event.release.tag_name }}
version: ${{ github.event.release.tag_name }}
changelog: ${{ github.event.release.body }}
game_versions: 1.7.2
release_type: release
loaders: velocity
featured: false
project_id: OfMfkdiO