Replace RunAroundLikeCrazyGoalMixin::tick overwrite with injects (#4151) #1909
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
# This workflow should have the same content as build-project.yaml, plus extra handling for publishing | |
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- 'api-*' | |
- update/* | |
tags-ignore: [ '**' ] | |
env: | |
CACHE_REV: 1 | |
jobs: | |
build: | |
uses: ./.github/workflows/common-run-build.yaml | |
secrets: inherit | |
integrationTest: | |
needs: build | |
uses: ./.github/workflows/common-integration-test.yaml | |
secrets: inherit | |
publish: | |
needs: integrationTest | |
runs-on: ubuntu-22.04 | |
# This enables publishing individual projects in parallel | |
strategy: | |
fail-fast: false | |
matrix: | |
project: | |
- vanilla | |
- forge | |
- neoforge | |
include: | |
- project: vanilla | |
gradleProject: SpongeVanilla | |
- project: forge | |
gradleProject: SpongeForge | |
- project: neoforge | |
gradleProject: SpongeNeo | |
steps: | |
- name: setup | |
if: "!startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla'" | |
id: setup | |
uses: SpongePowered/.github/.github/actions/setup-java-env@master | |
with: | |
runtime_version: 21 | |
publishing_branch_regex: '' | |
- name: setup / minecraft cache | |
if: "!startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla'" | |
uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2 | |
with: | |
path: | | |
${{ github.workspace}}/buildSrc/.gradle/ | |
${{ github.workspace}}/.gradle/ | |
key: "${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-${{ hashFiles('**/*.gradle*') }}" | |
restore-keys: | | |
${{ runner.os }}-minecraft-${{ env.CACHE_REV }}- | |
# We don't need to run tests again, so we just publish | |
- name: setup / workspace | |
if: "!startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla'" | |
run: | | |
echo "GIT_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV | |
echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
echo "BUILD_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV | |
- name: Publish to Sponge Maven & GitHub Packages | |
if: "!startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla'" | |
run: ./gradlew -s -Pprojects=vanilla,${{ matrix.project }} :${{ matrix.gradleProject }}:publish | |
env: | |
CI_SYSTEM: Github Actions | |
GITHUB_USERNAME: "${{ github.actor }}" | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
ORG_GRADLE_PROJECT_spongeSnapshotRepo: "${{ secrets.SPONGE_MAVEN_SNAPSHOT_REPO_URL }}" | |
ORG_GRADLE_PROJECT_spongeReleaseRepo: "${{ secrets.SPONGE_MAVEN_RELEASE_REPO_URL }}" | |
ORG_GRADLE_PROJECT_spongeUsername: "${{ secrets.SPONGE_MAVEN_REPO_USER }}" | |
ORG_GRADLE_PROJECT_spongePassword: "${{ secrets.SPONGE_MAVEN_REPO_PASSWORD }}" |