-
-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (56 loc) · 1.8 KB
/
maven-tag.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
name: Java CI
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
env: # Or as an environment variable
BOT_TOKEN: ${{ secrets.DEPLOY_BOT_TOKEN }}
TARGET_CHAT_IDS: "[487353090, -1001342632426]"
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
ARTIFACT: "target/moe-moe-secretary.jar"
steps:
- uses: actions/[email protected]
- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 11
- name: Install Python 3.7
uses: actions/[email protected]
with:
python-version: '3.7'
- name: Install requirements
run: python3 -m pip -q install -r .github/workflows/requirements.txt
- name: Build with Maven
run: mvn -q -ntp -B package
- name: Maven build failed
if: failure()
run: python3 .github/workflows/deployer.py maven_build_failed
- name: Upload artifact
uses: actions/[email protected]
with:
name: "moe-moe-secretary.jar"
path: "target/moe-moe-secretary.jar"
- name: GitHub deploy failed
if: failure()
run: python3 .github/workflows/deployer.py github_deploy_failed
- name: Create Release
id: create_release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref_name }}
body: New Moe Moe Secretary release
draft: false
prerelease: false
files: target/moe-moe-secretary.jar
- name: Deploy to Telegram
run: python3 .github/workflows/deployer.py deploy_to_telegram
- name: Telegram deploy failed
if: failure()
run: python3 .github/workflows/deployer.py telegram_deploy_failed