-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (40 loc) · 1.19 KB
/
release.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
name: 自动发布
on:
push:
branches: [ "release" ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 16
uses: actions/setup-java@v3
with:
java-version: '16'
distribution: 'temurin'
cache: maven
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install Node.js dependencies
run: npm install
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Get Version
run: |
node ./js/getversion.js
- name: Create Tag
uses: negz/create-tag@v1
with:
version: "${{ env.version }}"
message: "Release version"
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Automatic Releases
run: node ./js/release.js
env:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
release_title: "DodoOpenJava-${{ env.version }}"
version: "${{ env.version }}"
- name: Deploy jitpack
run: curl -s -m 30 https://jitpack.io/com/github/MinecraftChampions/DodoOpenJava/${{ env.version }}/ || true