-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (45 loc) · 1.71 KB
/
build.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: build
on:
workflow_dispatch:
push:
tags:
- 'v[6]+.[0-9]+.[0-9]+*'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
#- name: Fetch git tags to know if this is a release
# run: git fetch --prune --unshallow --tags
- name: Pull full tag information if any so `git describe` works in gradle
run: git fetch -uf origin ${{ github.ref }}:${{ github.ref }}
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8.0
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Sync cache
uses: actions/cache@v3
with:
path: ~/.gradle
key: .gradle
- name: Setup and Assemble with Gradle
run: ./gradlew clean assemble
- name: Extract version number
id: version_number
run: echo "version_number=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: gregtech-CH_Editon_1.7.10-${{ steps.version_number.outputs.version_number }}
body: |
mod 本体:gregtech_1.7.10-${{ steps.version_number.outputs.version_number }}.jar
默认配置文件:gregtech_1.7.10-${{ steps.version_number.outputs.version_number }}-defaultConfigPack.zip
附加汉化文件:gregtech_1.7.10-${{ steps.version_number.outputs.version_number }}-language_CH.zip
OmniOcular配置文件:gregtech_1.7.10-${{ steps.version_number.outputs.version_number }}-OmniOcular_CH.zip
files: build/libs/!(*changelog*|*supporterlist*)
token: ${{ secrets.CHANZY_TOKEN }}