-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (38 loc) · 1.63 KB
/
publish.yml
File metadata and controls
44 lines (38 loc) · 1.63 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
name: Release New Version
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
- name: Set Version
run: |
sed -i 's/debug-build/${{ github.event.release.tag_name }}/g' src/main/resources/fabric.mod.json
sed -i 's/debug-build/${{ github.event.release.tag_name }}/g' src/main/resources/velocity-plugin.json
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Execute Gradle build
run: ./gradlew build
- name: Rename Files
run: |
mv ${{ github.workspace }}/build/libs/sqlib-all.jar ${{ github.workspace }}/sqlib-${{ github.event.release.tag_name }}.jar;
mv ${{ github.workspace }}/build/libs/sqlib-javadoc.jar ${{ github.workspace }}/sqlib-${{ github.event.release.tag_name }}-javadoc.jar;
mv ${{ github.workspace }}/build/libs/sqlib-sources.jar ${{ github.workspace }}/sqlib-${{ github.event.release.tag_name }}-sources.jar;
- name: Publish Release
uses: Kir-Antipov/mc-publish@v3.3.0
with:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: true
files: |
${{ github.workspace }}/sqlib-${{ github.event.release.tag_name }}.jar
${{ github.workspace }}/sqlib-${{ github.event.release.tag_name }}-javadoc.jar
${{ github.workspace }}/sqlib-${{ github.event.release.tag_name }}-sources.jar
java: 21
game-versions: |
>=1.16.5