@@ -29,26 +29,33 @@ jobs:
29
29
fail-fast : false
30
30
matrix :
31
31
project :
32
+ - common
32
33
- vanilla
33
34
- forge
34
35
- neoforge
35
36
include :
37
+ - project : common
38
+ gradleProject : ' '
39
+ skipUpdateBranch : false
36
40
- project : vanilla
37
- gradleProject : SpongeVanilla
41
+ gradleProject : ' :SpongeVanilla'
42
+ skipUpdateBranch : false
38
43
- project : forge
39
- gradleProject : SpongeForge
44
+ gradleProject : ' :SpongeForge'
45
+ skipUpdateBranch : true
40
46
- project : neoforge
41
- gradleProject : SpongeNeo
47
+ gradleProject : ' :SpongeNeo'
48
+ skipUpdateBranch : true
42
49
steps :
43
50
- name : setup
44
- if : " !startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla' "
51
+ if : " !(matrix.skipUpdateBranch && startsWith(github.ref, 'refs/heads/update/')) "
45
52
id : setup
46
53
uses : SpongePowered/.github/.github/actions/setup-java-env@master
47
54
with :
48
55
runtime_version : 21
49
56
publishing_branch_regex : ' '
50
57
- name : setup / minecraft cache
51
- if : " !startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla' "
58
+ if : " !(matrix.skipUpdateBranch && startsWith(github.ref, 'refs/heads/update/')) "
52
59
uses : " actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
53
60
with :
54
61
path : |
@@ -59,14 +66,14 @@ jobs:
59
66
${{ runner.os }}-minecraft-${{ env.CACHE_REV }}-
60
67
# We don't need to run tests again, so we just publish
61
68
- name : setup / workspace
62
- if : " !startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla' "
69
+ if : " !(matrix.skipUpdateBranch && startsWith(github.ref, 'refs/heads/update/')) "
63
70
run : |
64
71
echo "GIT_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
65
72
echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
66
73
echo "BUILD_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
67
74
- name : Publish to Sponge Maven & GitHub Packages
68
- if : " !startsWith(github.ref, 'refs/heads/update/') || matrix.project == 'vanilla' "
69
- run : ./gradlew -s -Pprojects=vanilla, ${{ matrix.project }} : ${{ matrix.gradleProject }}:publish
75
+ if : " !(matrix.skipUpdateBranch && startsWith(github.ref, 'refs/heads/update/')) "
76
+ run : ./gradlew -s -Pprojects=${{ matrix.project }} ${{ matrix.gradleProject }}:publish
70
77
env :
71
78
CI_SYSTEM : Github Actions
72
79
GITHUB_USERNAME : " ${{ github.actor }}"
0 commit comments