-
-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (78 loc) · 2.6 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: release
on:
# pull_request:
# branches:
# - main
push:
tags:
- "v*" # Run if someone pushes a semantic versioned tag to the GitHub repo
env:
APPEND_BUILD_NUMBER: false
jobs:
build:
name: release
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
with:
# Fetch all history for all tags and branches
fetch-depth: 0
- name: read version from tag
id: version_read
run: echo "tag_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
shell: bash
# https://github.com/marketplace/actions/semver-utils
- uses: madhead/semver-utils@latest
id: version
with:
# Fail the task if it can't parse the version
lenient: false
# The ref_name will be the version tag
version: ${{ github.ref_name }}
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: gradle
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
env:
MOD_VERSION: ${{ steps.version.outputs.release }}
- name: capture build artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: build/libs/
- uses: Kir-Antipov/[email protected]
with:
name: v${{ steps.version.outputs.release }} for ${{ steps.version.outputs.build }}
version: ${{ steps.version.outputs.release }}+${{ steps.version.outputs.build }}
version-type: release
loaders: |
fabric
game-versions: |
1.20.1
java: |
17
github-generate-changelog: true
github-draft: false
github-prerelease: false
github-token: ${{ secrets.GITHUB_TOKEN }}
files-primary: build/libs/!(*-@(dev|sources|javadoc)).jar
files-secondary: build/libs/*-@(dev|sources|javadoc).jar
#modrinth-id: Read from fabric.mod.json custom.modmanager.modrinth
modrinth-featured: true
modrinth-unfeature-mode: subset
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
#curseforge-id: Read from fabric.mod.json custom.modmanager.curseforge
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
retry-attempts: 2
retry-delay: 10000
fail-mode: fail