create-air-fabric/.gitea/workflows/build.yml

63 lines
1.5 KiB
YAML
Raw Normal View History

name: build
on:
pull_request: {}
push: {}
workflow_dispatch: {}
jobs:
build:
2025-01-21 06:43:53 +08:00
env:
RUN_NUMBER: ${{ gitea.run_number }}
strategy:
matrix:
2025-01-21 06:06:25 +08:00
java: [ '21' ]
runs-on: ubuntu-latest
steps:
2025-01-21 05:55:40 +08:00
- name: Checkout Code
2025-01-21 05:39:28 +08:00
uses: actions/checkout@v4
2025-01-21 05:55:40 +08:00
- name: Setup JDK ${{ matrix.java }}
2025-01-21 05:39:28 +08:00
uses: actions/setup-java@v4
with:
2025-01-21 05:39:28 +08:00
distribution: 'liberica'
java-version: ${{ matrix.java }}
2025-01-21 06:28:15 +08:00
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
2025-01-21 05:55:40 +08:00
- name: Build with Gradle
run: ./gradlew build
2025-01-21 05:55:40 +08:00
- name: Upload Mod JAR
uses: actions/upload-artifact@v3
with:
name: create-air-fabric
path: build/libs/*.jar
upload-release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: create-air-fabric
2025-01-21 05:39:28 +08:00
- name: Make release
2025-01-21 05:46:41 +08:00
uses: akkuman/gitea-release-action@v1
with:
2025-01-21 06:03:53 +08:00
name: Create Air Fabric 1.0-${{ gitea.run_number }} for 1.20.1
2025-01-21 06:24:20 +08:00
tag_name: createairfabric-1.0+1.20.1-${{ gitea.run_number }}
2025-01-21 05:39:28 +08:00
md5sum: true
sha256sum: true
files: |-
2025-01-21 06:24:20 +08:00
*.jar
2025-01-21 05:55:40 +08:00
# build/libs/**