-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.38 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
name: Maven Release
on:
release:
types: [ published ]
jobs:
package-and-upload:
name: Build and Upload JARs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set release version
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT
id: version
- name: Set project version
run: mvn -B versions:set -DnewVersion=${{ steps.version.outputs.VERSION }} -DgenerateBackupPoms=false
- name: Build and package Maven project
run: mvn clean package
- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: target/EnchantBookPlus-${{ steps.version.outputs.VERSION }}.jar application/java-archive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to Modrinth
uses: cloudnode-pro/[email protected]
with:
token: '${{ secrets.MODRINTH_TOKEN }}'
project: '${{ github.event.repository.custom_properties.modrinth_id }}'
file: target/EnchantBookPlus-${{ steps.version.outputs.VERSION }}.jar
changelog: ${{ github.event.release.body }}
loaders: paper