tweaks/.forgejo/workflows/build.yml

42 lines
1 KiB
YAML
Raw Normal View History

2024-06-09 18:16:12 +00:00
name: Build ExploreCraft Tweaks
#on: [pull_request, push]
on:
push:
tags:
- '*'
2024-06-09 17:03:28 +00:00
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS
]
runs-on: ubuntu-latest
steps:
2024-06-09 17:45:56 +00:00
- name: ⏬ Checkout repository
2024-06-09 17:03:28 +00:00
uses: actions/checkout@v4
2024-06-09 17:40:05 +00:00
2024-06-09 17:45:56 +00:00
- name: ✅ Validate gradle wrapper
2024-06-09 17:09:30 +00:00
uses: https://github.com/gradle/wrapper-validation-action@v2
2024-06-09 17:40:05 +00:00
2024-06-09 17:45:56 +00:00
- name: 🛠️ Setup JDK ${{ matrix.java }}
2024-06-09 17:03:28 +00:00
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: "microsoft"
2024-06-09 17:40:05 +00:00
2024-06-09 17:45:56 +00:00
- name: ▶️ Make gradle wrapper executable
2024-06-09 17:03:28 +00:00
run: chmod +x ./gradlew
2024-06-09 17:40:05 +00:00
2024-06-09 17:45:56 +00:00
- name: 🔧 Build ExploreCraft Tweaks
2024-06-09 17:03:28 +00:00
run: ./gradlew build
2024-06-09 17:40:05 +00:00
2024-06-09 17:45:56 +00:00
- name: 🫳 Capture build artifacts
2024-06-09 17:03:28 +00:00
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
2024-06-09 17:40:05 +00:00
uses: actions/upload-artifact@v3
2024-06-09 17:03:28 +00:00
with:
2024-06-09 17:40:05 +00:00
name: ec-tweaks-build
2024-06-09 17:03:28 +00:00
path: build/libs/