-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (33 loc) · 970 Bytes
/
build.yml
File metadata and controls
42 lines (33 loc) · 970 Bytes
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
name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Add execute permission to gradlew
run: chmod +x gradlew
- name: Set up JDK 23
uses: actions/setup-java@v4
with:
java-version: '23'
distribution: 'temurin'
- name: Build with Gradle
run: ./gradlew build
- name: Upload JAR file
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/*.jar
- name: Publish
if: github.ref == 'refs/heads/main' && github.repository_owner == 'SuperCrafting'
env:
GITHUB_TOKEN: ${{ secrets.PACKAGE_SECRET }}
GITHUB_USERNAME: ${{ github.repository_owner }}
GITHUB_REPOSITORY: ${{ github.repository }}
BUILD_VERSION: ${{ github.run_number }}
run: ./gradlew publish