@@ -27,10 +27,13 @@ jobs:
27
27
28
28
steps :
29
29
30
+ # -- Checkout repo
30
31
- name : Check Out Git Repository
31
32
uses : actions/checkout@v4
32
33
33
34
35
+ # --- Parse the modpacks to and list
36
+ # This just parses the folders that have pack.toml
34
37
- name : List Modpacks
35
38
id : list_modpacks
36
39
run : |
45
48
46
49
echo "modpack_folders=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${modpackFolders[@]}")" >> "$GITHUB_OUTPUT"
47
50
51
+
52
+ # --- Print an nice msg about parsing
48
53
- name : Current detected modpacks
49
54
run : |
50
55
echo "::notice ::⚙ Current detected modpacks: ${{ steps.list_modpacks.outputs.modpack_folders }}"
77
82
steps :
78
83
79
84
# --- Release please
80
-
85
+ # Creates and manages the prs and releases
81
86
- name : Perform Release with Release Please
82
87
id : release-please
83
88
uses : google-github-actions/release-please-action@v3
@@ -94,38 +99,54 @@ jobs:
94
99
{"type":"update","section":"⚘ Modpack Updates","hidden":false},
95
100
{"type":"chore","section":"⛭ Miscellaneous","hidden":true}]
96
101
102
+
103
+ # --- Parse version from PR Title when creating PR's
104
+ # Had to do this cause like to bump on the release pleae branch
105
+ # The tests for the shitty Regex can be found here: https://regexr.com/7lb8e
106
+ - name : Parse tag from PR title
107
+ uses : actions-ecosystem/action-regex-match@v2
108
+ id : version
109
+ with :
110
+ text : ${{ fromJson(steps.release-please.outputs.pr).title }}
111
+ regex : ' (?<=\s)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$'
112
+ if : ${{ steps.release-please.outputs.pr != '' }}
113
+
114
+
115
+ # --- Checkout the git repo
116
+ # Remembed to do this AFTER release please
97
117
- name : Check Out Git Repository
98
118
uses : actions/checkout@v4
99
119
with :
100
120
fetch-depth : 0
101
121
102
122
103
- # --- Bump pack.toml version
104
- # Get Latest tag
105
- # TODO: Change to release please tag
106
- - name : Get Latest tag
107
- id : tag
108
- uses : WyriHaximus/github-action-get-previous-tag@v1
109
- if : ${{ steps.release-please.outputs.releases_created }}
110
-
111
- - name : Bump version
123
+ # --- Bump version
124
+ # Now we should use the parsed release to bump the version on the files on the release please branch
125
+ - name : Bump Version
112
126
uses : ./.github/actions/bump-pack
113
127
with :
114
- release-tag : ${{ steps.tag .outputs.tag }}
128
+ release-tag : ${{ steps.version .outputs.match }}
115
129
modpack : ${{ matrix.modpack }}
116
- if : ${{ steps.release-please.outputs.releases_created }}
130
+ branch : ${{ fromJson(steps.release-please.outputs.pr).headBranchName }}
131
+ if : ${{ steps.release-please.outputs.pr != '' }}
117
132
118
133
119
- # --- Handle the configs
134
+ # --- Get latest tag
135
+ # Should probably be switched to use the release please tag but whatever
136
+ - name : Get Latest tag
137
+ id : tag
138
+ uses : WyriHaximus/github-action-get-previous-tag@v1
139
+ if : ${{ steps.release-please.outputs.releases_created }}
120
140
121
- - name : Parse pack file
141
+ # --- Handle the configs
142
+ - name : Parse Pack File
122
143
id : parse
123
144
uses : ./.github/actions/parse
124
145
with :
125
146
modpack : ${{ matrix.modpack }}
126
147
if : ${{ steps.release-please.outputs.releases_created }}
127
148
128
- - name : Set mod vendors
149
+ - name : Set Mod Vendors
129
150
id : set-mod-vendors
130
151
run : |
131
152
[[ ! -z "${{ secrets.CURSEFORGE_TOKEN }}" && ! -z "${{ secrets.CURSEFORGE_ID }}" ]] && echo "curseforge=true" >> $GITHUB_OUTPUT || echo "curseforge=false" >> $GITHUB_OUTPUT
@@ -135,8 +156,7 @@ jobs:
135
156
136
157
137
158
# --- Build an release
138
-
139
- - name : Build modpack
159
+ - name : Build Modpack
140
160
uses : ./.github/actions/build
141
161
with :
142
162
modpack : ${{ matrix.modpack }}
@@ -145,7 +165,9 @@ jobs:
145
165
build-curse : ${{ env.default-release-curseforge }}
146
166
if : ${{ steps.release-please.outputs.releases_created }}
147
167
148
- - name : Release modpack to vendors
168
+
169
+ # --- Release
170
+ - name : Release Modpack to Vendors
149
171
uses : ./.github/actions/release
150
172
with :
151
173
modpack : ${{ matrix.modpack }}
0 commit comments