Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/1.20-fabric' into 1…
Browse files Browse the repository at this point in the history
….20.4-fabric

# Conflicts:
#	.github/workflows/build.yml
#	build.gradle
#	gradle.properties
  • Loading branch information
melontini committed Apr 30, 2024
2 parents 5f846cc + d4ec695 commit a1698e7
Show file tree
Hide file tree
Showing 12 changed files with 193 additions and 290 deletions.
49 changes: 0 additions & 49 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/ISSUE_TEMPLATE/crash_report.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
registries:
fabric:
url: "https://maven.fabricmc.net/"
type: maven-repository
gradle-plugins:
url: "https://plugins.gradle.org/m2/"
type: maven-repository
maven-central:
url: "https://repo1.maven.org/maven2/"
type: maven-repository

updates:
- package-ecosystem: gradle
registries:
- fabric
- gradle-plugins
- maven-central
ignore:
- dependency-name: me.melontini:dark-matter*
- dependency-name: io.wispforest:owo-lib
- dependency-name: me.melontini:handy-tests
directory: /
schedule:
interval: weekly
147 changes: 13 additions & 134 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,139 +1,18 @@

name: build
on:
push:
workflow_dispatch:
inputs:
version_type:
description: "The type of this version. e.g alpha"
type: choice
default: beta
options:
- release
- beta
- alpha
required: false
on: [ push, pull_request ]

jobs:
build:
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[ci skip]')
outputs:
version_info: ${{ steps.get_version.outputs.version_info }}
version_plain: ${{ steps.get_version.outputs.version_plain }}
steps:
- name: checkout repository
uses: actions/[email protected]
- name: validate gradle wrapper
uses: gradle/[email protected]
- name: setup jdk
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: get version #https://stackoverflow.com/questions/71089787/how-to-get-version-name-from-android-gradle-file-in-github-actions
id: get_version
run: |
echo "version_info=$(${{github.workspace}}/gradlew -q printVersionName)" >> $GITHUB_OUTPUT
echo "version_plain=$(${{github.workspace}}/gradlew -q printVersion)" >> $GITHUB_OUTPUT
- name: capture build artifacts
uses: actions/[email protected]
with:
name: Artifacts
path: build/libs/

client_test:
needs: build
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/[email protected]
- name: validate gradle wrapper
uses: gradle/[email protected]
- name: setup jdk 17
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: run testmod
uses: modmuss50/xvfb-action@v1
with:
run: ./gradlew runTestClient --stacktrace --warning-mode=fail
- uses: actions/[email protected]
with:
name: Test Screenshots
path: run/screenshots

packages:
needs:
- build
- client_test
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/[email protected]
- name: setup jdk
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew publish
publish:
needs:
- build
- client_test
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
steps:
- name: checkout repository
uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: Artifacts
path: build/libs

- name: publish release
uses: Kir-Antipov/[email protected]
with:
version-type: ${{ inputs.version_type }}
changelog-file: CHANGELOG.md
name: ${{ needs.build.outputs.version_info }}
version: ${{ needs.build.outputs.version_plain }}

game-versions: |
1.20.4
loaders: |
fabric
java: |
17
github-tag: v${{ needs.build.outputs.version_plain }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-commitish: ${{ github.sha }}
github-prerelease: false

modrinth-id: etNS9OnA
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: true
modrinth-unfeature-mode: subset
modrinth-dependencies: |
dark-matter(embedded)
uses: constellation-mc/actions/.github/workflows/gradle-build.yml@main
with:
java: 17
gradle_tasks: spotbugs
reviewdog: |
cat ./build/reports/spotbugs/main/spotbugs.sarif | reviewdog -name="spotbugs" -f=sarif -reporter=github-check -level=warning
run_tests:
uses: constellation-mc/actions/.github/workflows/mc-tests.yml@main
with:
java: 17
client_task: runTestClient
23 changes: 0 additions & 23 deletions .github/workflows/build_pr.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

name: publish
on:
workflow_dispatch:
inputs:
version_type:
description: "The type of this version. e.g alpha"
type: choice
default: BETA
options:
- STABLE
- BETA
- ALPHA
- NONE
required: false

jobs:
publish:
uses: constellation-mc/actions/.github/workflows/mc-publish.yml@main
with:
java: 17
version_type: ${{ inputs.version_type }}
secrets: inherit
Loading

0 comments on commit a1698e7

Please sign in to comment.