Skip to content

Commit 1b5786c

Browse files
committed
Ci
1 parent c453ee8 commit 1b5786c

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/build.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: atDeprecated CI - master
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions: write-all
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
environment: default
15+
steps:
16+
- name: Checkout Git Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Gradle
20+
uses: gradle/actions/setup-gradle@v4
21+
22+
- name: Set up JDK
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: 'zulu'
26+
java-version: '22'
27+
28+
- name: Grant execute permission for gradlew
29+
run: chmod +x gradlew
30+
31+
- name: Configure Git User Details
32+
run: git config --global user.email "ci@mntale.fun" && git config --global user.name "atDeprecated CI"
33+
34+
- name: Apply Patches
35+
run: ./gradlew applyAllPatches
36+
37+
- name: CreateJar
38+
run: ./gradlew createMojmapPaperclipJar
39+
40+
- name: Upload Artifact
41+
uses: "actions/upload-artifact@v4"
42+
with:
43+
name: "${{ env.project_id_b }} CI Artifacts"
44+
path: "atdeprecated-server/build/libs/*-paperclip-*-mojmap.jar"
45+
46+
- name: SetENV
47+
if: github.event_name != 'pull_request'
48+
run: sh scripts/SetENV.sh
49+
50+
- name: Create Release
51+
if: github.event_name != 'pull_request'
52+
uses: ncipollo/release-action@v1.16.0
53+
with:
54+
tag: ${{ env.tag }}
55+
name: ${{ env.project_id_b }} ${{ env.mcversion }} - ${{ env.commit_id }}
56+
body: |
57+
📦Version: `${{ env.mcversion }}`@${{ env.commit_id }} [![download](https://img.shields.io/github/downloads/MidnightTale/${{ env.project_id }}/${{ env.tag }}/total?color=red&style=flat-square)](https://github.com/MidnightTale/${{ env.project_id }}/releases/download/${{ env.tag }}/${{ env.jar }})
58+
This release is automatically compiled by GitHub Actions
59+
### Commit history
60+
${{ env.commit_msg }}
61+
artifacts: |
62+
${{ env.jar_dir }}
63+
generateReleaseNotes: true
64+
prerelease: ${{ env.pre }}
65+
makeLatest: ${{ env.make_latest }}
66+
token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)