forked from Norbit4/TreeCuter
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 1.55 KB
/
Copy pathbuild.yml
File metadata and controls
61 lines (54 loc) · 1.55 KB
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
name: Build
on:
workflow_dispatch:
pull_request:
push:
branches:
- "ver/**"
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.commits[0].message, '[ci skip]')"
permissions:
contents: write
env:
BUILD_NUMBER: ${{ github.run_number }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build TreeCuter
run: ./gradlew build
- name: Prepare release notes and artifacts
run: |
chmod +x ./scripts/prepareRelease.sh
./scripts/prepareRelease.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ github.repository }}
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
- name: Upload TreeCuter
uses: actions/upload-artifact@main
with:
name: TreeCuter
path: ./build/libs/TreeCuter-v2.0.4.jar
- name: Release TreeCuter
uses: softprops/action-gh-release@master
with:
name: "🌳 TreeCuter build ${{ env.BUILD_NUMBER }}"
tag_name: "2.0"
files: |
./build/libs/TreeCuter-v2.0.4.jar
body_path: "./RELEASE.md"
token: "${{ secrets.GITHUB_TOKEN }}"
target_commitish: "${{ github.sha }}"
draft: false
prerelease: false