mirror of
https://github.com/Lucaslah/No-Report-Button.git
synced 2026-01-07 05:57:53 +00:00
Add build CI
This commit is contained in:
68
.github/workflows/build.yml
vendored
Normal file
68
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||||
|
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: ./gradlew build
|
||||||
|
|
||||||
|
- name: Set Commit SHA
|
||||||
|
id: commit_short_sha
|
||||||
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Find Build Artifacts
|
||||||
|
run: |
|
||||||
|
mkdir -p artifacts
|
||||||
|
|
||||||
|
find . -type d -path '*/build/libs' | while read -r dir; do
|
||||||
|
project_name=$(basename "$(dirname "$(dirname "$dir")")")
|
||||||
|
mkdir -p "artifacts/$project_name"
|
||||||
|
cp -r "$dir"/* "artifacts/$project_name/"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: 'NRB-Build-${{ steps.vars.outputs.sha_short }}'
|
||||||
|
path: 'artifacts/'
|
||||||
|
|
||||||
|
|
||||||
|
dependency-submission:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
|
||||||
|
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
|
||||||
|
- name: Generate and submit dependency graph
|
||||||
|
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
|
||||||
@@ -15,7 +15,7 @@ See below for what NRB version to use.
|
|||||||
## Released Versions
|
## Released Versions
|
||||||
| Version | MC Version | Mod loaders | Git tag | Supported |
|
| Version | MC Version | Mod loaders | Git tag | Supported |
|
||||||
|------------|---------------|-------------------------|-------------------------------------------------------------------------------------|-----------|
|
|------------|---------------|-------------------------|-------------------------------------------------------------------------------------|-----------|
|
||||||
| 1.6.1 | 1.21 | fabric, forge, neoforge | | yes |
|
| 1.6.1 | 1.21 | fabric, forge, neoforge | [1.6.1](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.6.1) | yes |
|
||||||
| 1.6.0 | 1.21 | fabric, forge, quilt | [1.6.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.6.0) | no |
|
| 1.6.0 | 1.21 | fabric, forge, quilt | [1.6.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.6.0) | no |
|
||||||
| 1.6.0-beta | 1.21 | fabric | [1.6.0-beta](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.6.0-beta) | no |
|
| 1.6.0-beta | 1.21 | fabric | [1.6.0-beta](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.6.0-beta) | no |
|
||||||
| 1.5.0 | 1.20.1-1.20.6 | fabric, forge, quilt | [1.5.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.5.0) | yes |
|
| 1.5.0 | 1.20.1-1.20.6 | fabric, forge, quilt | [1.5.0](https://github.com/Lucaslah/No-Report-Button/releases/tag/v1.5.0) | yes |
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ subprojects {
|
|||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
base {
|
base {
|
||||||
// Set up a suffixed format for the mod jar names, e.g. `example-fabric`.
|
|
||||||
archivesName = "$rootProject.archives_name-$project.name"
|
archivesName = "$rootProject.archives_name-$project.name"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user