Skip to content

Commit 4e3f34c

Browse files
authored
Update build.yml
1 parent f357c79 commit 4e3f34c

File tree

1 file changed

+36
-20
lines changed

1 file changed

+36
-20
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,47 @@
1-
name: Build Plugin
1+
name: Build Whisper of Cosmos
22

33
on:
44
push:
55
branches: [ main, master ]
66
pull_request:
77
branches: [ main, master ]
8+
workflow_dispatch:
89

910
jobs:
1011
build:
1112
runs-on: ubuntu-latest
13+
1214
steps:
13-
- name: 📥 Checkout repository
14-
uses: actions/checkout@v4
15-
16-
- name: ☕ Set up JDK 21
17-
uses: actions/setup-java@v4
18-
with:
19-
java-version: '21'
20-
distribution: 'temurin'
21-
cache: 'maven'
22-
23-
- name: 🏗️ Build with Maven
24-
run: mvn clean package
25-
26-
- name: 📦 Upload JAR artifact
27-
uses: actions/upload-artifact@v4
28-
with:
29-
name: AuthTelegram
30-
path: target/*.jar
31-
retention-days: 7
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up JDK 21
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '21'
21+
distribution: 'temurin'
22+
23+
- name: Cache Maven dependencies
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.m2
27+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-m2-
30+
31+
- name: Build with Maven
32+
run: mvn clean package --file pom.xml
33+
34+
- name: Upload JAR artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: WhisperOfCosmos-1.21.10
38+
path: target/*.jar
39+
retention-days: 7
40+
if-no-files-found: error
41+
42+
- name: Display success message
43+
if: success()
44+
run: |
45+
echo "✅ Сборка успешно завершена!"
46+
echo "📦 JAR файл доступен в разделе Artifacts"
47+
find target -name "*.jar" -exec echo "Файл: {}" \;

0 commit comments

Comments
 (0)