generated from PurpurMC/Tentacles
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (56 loc) · 1.89 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build Graphite
on:
push:
workflow_dispatch:
env:
version: 1.20.1
branch: ver/1.20.1
jobs:
release:
if: "!startsWith(github.event.commits[0].message, '[CI-SKIP]')"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Configure Git
run: |
git config --global user.email "[email protected]" && git config --global user.name "Github Actions"
echo "workflow=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
- name: Apply patches
run: ./gradlew applyPatches --stacktrace
- name: Build
run: ./gradlew build --stacktrace
- name: Create Reobf Jar
run: ./gradlew createReobfPaperclipJar --stacktrace
- name: Create Mojmap Jar
run: ./gradlew createMojmapPaperclipJar --stacktrace
- name: Upload Artifacts
if: github.ref_name != env.branch
uses: actions/upload-artifact@main
with:
name: Artifacts
path: build/libs
- name: Release Artifacts
if: github.ref_name == env.branch
uses: marvinpinto/action-automatic-releases@latest
with:
title: "Release #${{ env.workflow }}"
automatic_release_tag: release-${{ env.workflow }}
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: build/libs/*.jar
prerelease: false
- name: Release Artifacts (Latest)
if: github.ref_name == env.branch
uses: marvinpinto/action-automatic-releases@latest
with:
title: "Release #${{ env.workflow }}"
automatic_release_tag: latest-${{ env.version }}
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: build/libs/*.jar
prerelease: false