Skip to content

Commit 6845396

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 73a1d82 + f93006b commit 6845396

File tree

4 files changed

+33
-109
lines changed

4 files changed

+33
-109
lines changed

.github/workflows/auto_snapshot_update.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ on:
1717
description: "Fabric API version"
1818
required: true
1919
distinct_id:
20-
description: "Automatically set by the return-dispatch action (leave blank if running manually)"
2120
required: false
2221

2322
permissions:
@@ -91,20 +90,11 @@ jobs:
9190
git push
9291
9392
- name: Trigger CI
94-
id: ci_dispatch
95-
uses: codex-/return-dispatch@v2
93+
uses: Wurst-Imperium/dispatch-and-wait@v1
9694
with:
9795
token: ${{ github.token }}
98-
owner: Wurst-Imperium
96+
owner: ${{ github.repository_owner }}
9997
repo: ${{ github.event.repository.name }}
10098
ref: ${{ github.ref }}
10199
workflow: gradle.yml
102-
103-
- name: Wait for CI to finish (run ${{ steps.ci_dispatch.outputs.run_id }})
104-
uses: codex-/await-remote-run@v1
105-
with:
106-
token: ${{ github.token }}
107-
owner: Wurst-Imperium
108-
repo: ${{ github.event.repository.name }}
109-
run_id: ${{ steps.ci_dispatch.outputs.run_id }}
110100
run_timeout_seconds: 600 # 10 minutes

.github/workflows/gradle.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ on:
2424
workflow_dispatch:
2525
inputs:
2626
distinct_id:
27-
description: "Automatically set by the return-dispatch action (leave blank if running manually)"
2827
required: false
2928

3029
jobs:

.github/workflows/multi_publish.yml

Lines changed: 21 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -64,108 +64,60 @@ jobs:
6464
branch: ${{ fromJson(needs.prepare.outputs.branches) }}
6565
# TODO: Maybe also verify that the wurst_version in each branch is as expected before publishing?
6666
steps:
67-
- name: Build publish inputs
68-
id: publish_inputs
69-
run: |
70-
JSON_STRING=$(cat << EOF
71-
{
72-
"close_milestone": "true",
73-
"upload_backups": "true",
74-
"publish_github": "true",
75-
"update_website": "true"
76-
}
77-
EOF
78-
)
79-
# Convert to single line and escape quotes
80-
echo "json=${JSON_STRING//$'\n'/}" >> "$GITHUB_OUTPUT"
8167
- name: Trigger publish workflow
82-
id: publish_dispatch
83-
uses: codex-/return-dispatch@v2
68+
uses: Wurst-Imperium/dispatch-and-wait@v1
8469
with:
8570
token: ${{ github.token }}
8671
owner: Wurst-Imperium
8772
repo: Wurst7
8873
ref: ${{ matrix.branch }}
8974
workflow: publish.yml
90-
workflow_inputs: ${{ steps.publish_inputs.outputs.json }}
91-
- name: Wait for publish workflow to finish (run ${{ steps.publish_dispatch.outputs.run_id }})
92-
uses: codex-/await-remote-run@v1
93-
with:
94-
token: ${{ github.token }}
95-
owner: Wurst-Imperium
96-
repo: Wurst7
97-
run_id: ${{ steps.publish_dispatch.outputs.run_id }}
75+
workflow_inputs: |
76+
{
77+
"close_milestone": "true",
78+
"upload_backups": "true",
79+
"publish_github": "true",
80+
"update_website": "true"
81+
}
9882
run_timeout_seconds: 1800 # 30 minutes
9983

10084
announce_update:
10185
runs-on: ubuntu-latest
10286
needs: [prepare, publish_each]
10387
if: ${{ !failure() && !cancelled() && inputs.announce_update }}
10488
steps:
105-
- name: Build announcement inputs
106-
id: announce_inputs
107-
run: |
108-
JSON_STRING=$(cat << EOF
109-
{
110-
"wurst_version": "${{ inputs.wurst_version }}",
111-
"dry_run": "${{ inputs.dry_run }}"
112-
}
113-
EOF
114-
)
115-
# Convert to single line and escape quotes
116-
echo "json=${JSON_STRING//$'\n'/}" >> "$GITHUB_OUTPUT"
11789
- name: Trigger announce workflow
118-
id: announce_dispatch
119-
uses: codex-/return-dispatch@v2
90+
uses: Wurst-Imperium/dispatch-and-wait@v1
12091
with:
12192
token: ${{ secrets.WURSTCLIENT_NET_PUBLISH_TOKEN }}
12293
owner: Wurst-Imperium
12394
repo: WurstClient.net
12495
ref: gh-pages
12596
workflow: announce_wurst_update.yml
126-
workflow_inputs: ${{ steps.announce_inputs.outputs.json }}
127-
- name: Wait for announce workflow to finish (run ${{ steps.announce_dispatch.outputs.run_id }})
128-
uses: codex-/await-remote-run@v1
129-
with:
130-
token: ${{ secrets.WURSTCLIENT_NET_PUBLISH_TOKEN }}
131-
owner: Wurst-Imperium
132-
repo: WurstClient.net
133-
run_id: ${{ steps.announce_dispatch.outputs.run_id }}
97+
workflow_inputs: |
98+
{
99+
"wurst_version": "${{ inputs.wurst_version }}",
100+
"dry_run": "${{ inputs.dry_run }}"
101+
}
134102
run_timeout_seconds: 600 # 10 minutes
135103

136104
announce_ports:
137105
runs-on: ubuntu-latest
138106
needs: [prepare, publish_each]
139107
if: ${{ !failure() && !cancelled() && inputs.announce_ports }}
140108
steps:
141-
- name: Build announcement inputs
142-
id: announce_inputs
143-
run: |
144-
JSON_STRING=$(cat << EOF
145-
{
146-
"wurst_version": "${{ inputs.wurst_version }}",
147-
"branches": "${{ inputs.branches }}",
148-
"dry_run": "${{ inputs.dry_run }}"
149-
}
150-
EOF
151-
)
152-
# Convert to single line and escape quotes
153-
echo "json=${JSON_STRING//$'\n'/}" >> "$GITHUB_OUTPUT"
154109
- name: Trigger announce workflow
155-
id: announce_dispatch
156-
uses: codex-/return-dispatch@v2
110+
uses: Wurst-Imperium/dispatch-and-wait@v1
157111
with:
158112
token: ${{ secrets.WURSTCLIENT_NET_PUBLISH_TOKEN }}
159113
owner: Wurst-Imperium
160114
repo: WurstClient.net
161115
ref: gh-pages
162116
workflow: announce_wurst_ports.yml
163-
workflow_inputs: ${{ steps.announce_inputs.outputs.json }}
164-
- name: Wait for announce workflow to finish (run ${{ steps.announce_dispatch.outputs.run_id }})
165-
uses: codex-/await-remote-run@v1
166-
with:
167-
token: ${{ secrets.WURSTCLIENT_NET_PUBLISH_TOKEN }}
168-
owner: Wurst-Imperium
169-
repo: WurstClient.net
170-
run_id: ${{ steps.announce_dispatch.outputs.run_id }}
117+
workflow_inputs: |
118+
{
119+
"wurst_version": "${{ inputs.wurst_version }}",
120+
"branches": "${{ inputs.branches }}",
121+
"dry_run": "${{ inputs.dry_run }}"
122+
}
171123
run_timeout_seconds: 600 # 10 minutes

.github/workflows/publish.yml

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ on:
2525
type: boolean
2626
default: false
2727
distinct_id:
28-
description: "Automatically set by the return-dispatch action (leave blank if running manually)"
2928
required: false
3029

3130
permissions:
@@ -92,39 +91,23 @@ jobs:
9291
id: website_inputs
9392
if: ${{ inputs.update_website }}
9493
run: |
95-
MOD_VERSION=$(grep "^mod_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r')
96-
WURST_VERSION=$(echo "$MOD_VERSION" | sed 's/^v//' | sed 's/-MC.*$//')
97-
MC_VERSION=$(grep "^minecraft_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r')
98-
FAPI_VERSION=$(grep "^fabric_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r')
99-
JSON_STRING=$(cat << EOF
100-
{
101-
"wurst_version": "$WURST_VERSION",
102-
"mc_version": "$MC_VERSION",
103-
"fapi_version": "$FAPI_VERSION"
104-
}
105-
EOF
106-
)
107-
# Convert to single line and escape quotes
108-
echo "json=${JSON_STRING//$'\n'/}" >> "$GITHUB_OUTPUT"
94+
echo "wurst_version=$(grep "^mod_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r' | sed 's/^v//' | sed 's/-MC.*$//')" >> "$GITHUB_OUTPUT"
95+
echo "mc_version=$(grep "^minecraft_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
96+
echo "fapi_version=$(grep "^fabric_version=" gradle.properties | cut -d'=' -f2 | tr -d ' \r')" >> "$GITHUB_OUTPUT"
10997
11098
- name: Trigger website update
111-
id: website_dispatch
11299
if: ${{ inputs.update_website }}
113-
uses: codex-/return-dispatch@v2
100+
uses: Wurst-Imperium/dispatch-and-wait@v1
114101
with:
115102
token: ${{ secrets.WURSTCLIENT_NET_PUBLISH_TOKEN }}
116103
owner: Wurst-Imperium
117104
repo: WurstClient.net
118105
ref: gh-pages
119106
workflow: add_wurst_port.yml
120-
workflow_inputs: ${{ steps.website_inputs.outputs.json }}
121-
122-
- name: Wait for website update to finish (run ${{ steps.website_dispatch.outputs.run_id }})
123-
if: ${{ inputs.update_website }}
124-
uses: codex-/await-remote-run@v1
125-
with:
126-
token: ${{ secrets.WURSTCLIENT_NET_PUBLISH_TOKEN }}
127-
owner: Wurst-Imperium
128-
repo: WurstClient.net
129-
run_id: ${{ steps.website_dispatch.outputs.run_id }}
107+
workflow_inputs: |
108+
{
109+
"wurst_version": "${{ steps.website_inputs.outputs.wurst_version }}",
110+
"mc_version": "${{ steps.website_inputs.outputs.mc_version }}",
111+
"fapi_version": "${{ steps.website_inputs.outputs.fapi_version }}"
112+
}
130113
run_timeout_seconds: 600 # 10 minutes

0 commit comments

Comments
 (0)