|
1 | 1 | name: Publish Multiple Releases
|
2 |
| -run-name: Publish v${{ github.event.inputs.mod_version }} build(s) from ${{ github.event.inputs.branches }} |
| 2 | +run-name: Publish v${{ inputs.mod_version }} build(s) from ${{ inputs.branches }} |
3 | 3 |
|
4 | 4 | on:
|
5 | 5 | workflow_dispatch:
|
@@ -64,111 +64,63 @@ jobs:
|
64 | 64 | branch: ${{ fromJson(needs.prepare.outputs.branches) }}
|
65 | 65 | # TODO: Maybe also verify that the mod_version in each branch is as expected before publishing?
|
66 | 66 | 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 |
| - "publish_curseforge": "true", |
76 |
| - "update_website": "true" |
77 |
| - } |
78 |
| - EOF |
79 |
| - ) |
80 |
| - # Convert to single line and escape quotes |
81 |
| - echo "json=${JSON_STRING//$'\n'/}" >> "$GITHUB_OUTPUT" |
82 | 67 | - name: Trigger publish workflow
|
83 |
| - id: publish_dispatch |
84 |
| - uses: codex-/return-dispatch@v2 |
| 68 | + uses: Wurst-Imperium/dispatch-and-wait@v1 |
85 | 69 | with:
|
86 | 70 | token: ${{ github.token }}
|
87 |
| - owner: Wurst-Imperium |
88 |
| - repo: ChestESP |
| 71 | + owner: ${{ github.repository_owner }} |
| 72 | + repo: ${{ github.event.repository.name }} |
89 | 73 | ref: ${{ matrix.branch }}
|
90 | 74 | workflow: publish.yml
|
91 |
| - workflow_inputs: ${{ steps.publish_inputs.outputs.json }} |
92 |
| - - name: Wait for publish workflow to finish (run ${{ steps.publish_dispatch.outputs.run_id }}) |
93 |
| - uses: codex-/await-remote-run@v1 |
94 |
| - with: |
95 |
| - token: ${{ github.token }} |
96 |
| - owner: Wurst-Imperium |
97 |
| - repo: ChestESP |
98 |
| - 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 | + "publish_curseforge": "true", |
| 81 | + "update_website": "true" |
| 82 | + } |
99 | 83 | run_timeout_seconds: 1800 # 30 minutes
|
100 | 84 |
|
101 | 85 | announce_update:
|
102 | 86 | runs-on: ubuntu-latest
|
103 | 87 | needs: [prepare, publish_each]
|
104 | 88 | if: ${{ !failure() && !cancelled() && inputs.announce_update }}
|
105 | 89 | steps:
|
106 |
| - - name: Build announcement inputs |
107 |
| - id: announce_inputs |
108 |
| - run: | |
109 |
| - JSON_STRING=$(cat << EOF |
110 |
| - { |
111 |
| - "mod": "chestesp", |
112 |
| - "mod_version": "${{ inputs.mod_version }}", |
113 |
| - "dry_run": "${{ inputs.dry_run }}" |
114 |
| - } |
115 |
| - EOF |
116 |
| - ) |
117 |
| - # Convert to single line and escape quotes |
118 |
| - echo "json=${JSON_STRING//$'\n'/}" >> "$GITHUB_OUTPUT" |
119 | 90 | - name: Trigger announce workflow
|
120 |
| - id: announce_dispatch |
121 |
| - uses: codex-/return-dispatch@v2 |
| 91 | + uses: Wurst-Imperium/dispatch-and-wait@v1 |
122 | 92 | with:
|
123 | 93 | token: ${{ secrets.WIMODS_NET_PUBLISH_TOKEN }}
|
124 | 94 | owner: Wurst-Imperium
|
125 | 95 | repo: wimods.net
|
126 | 96 | ref: master
|
127 | 97 | workflow: announce_mod_update.yml
|
128 |
| - workflow_inputs: ${{ steps.announce_inputs.outputs.json }} |
129 |
| - - name: Wait for announce workflow to finish (run ${{ steps.announce_dispatch.outputs.run_id }}) |
130 |
| - uses: codex-/await-remote-run@v1 |
131 |
| - with: |
132 |
| - token: ${{ secrets.WIMODS_NET_PUBLISH_TOKEN }} |
133 |
| - owner: Wurst-Imperium |
134 |
| - repo: wimods.net |
135 |
| - run_id: ${{ steps.announce_dispatch.outputs.run_id }} |
| 98 | + workflow_inputs: | |
| 99 | + { |
| 100 | + "mod": "chestesp", |
| 101 | + "mod_version": "${{ inputs.mod_version }}", |
| 102 | + "dry_run": "${{ inputs.dry_run }}" |
| 103 | + } |
136 | 104 | run_timeout_seconds: 600 # 10 minutes
|
137 | 105 |
|
138 | 106 | announce_ports:
|
139 | 107 | runs-on: ubuntu-latest
|
140 | 108 | needs: [prepare, publish_each]
|
141 | 109 | if: ${{ !failure() && !cancelled() && inputs.announce_ports }}
|
142 | 110 | steps:
|
143 |
| - - name: Build announcement inputs |
144 |
| - id: announce_inputs |
145 |
| - run: | |
146 |
| - JSON_STRING=$(cat << EOF |
147 |
| - { |
148 |
| - "mod": "chestesp", |
149 |
| - "mod_version": "${{ inputs.mod_version }}", |
150 |
| - "branches": "${{ inputs.branches }}", |
151 |
| - "dry_run": "${{ inputs.dry_run }}" |
152 |
| - } |
153 |
| - EOF |
154 |
| - ) |
155 |
| - # Convert to single line and escape quotes |
156 |
| - echo "json=${JSON_STRING//$'\n'/}" >> "$GITHUB_OUTPUT" |
157 | 111 | - name: Trigger announce workflow
|
158 |
| - id: announce_dispatch |
159 |
| - uses: codex-/return-dispatch@v2 |
| 112 | + uses: Wurst-Imperium/dispatch-and-wait@v1 |
160 | 113 | with:
|
161 | 114 | token: ${{ secrets.WIMODS_NET_PUBLISH_TOKEN }}
|
162 | 115 | owner: Wurst-Imperium
|
163 | 116 | repo: wimods.net
|
164 | 117 | ref: master
|
165 | 118 | workflow: announce_mod_ports.yml
|
166 |
| - workflow_inputs: ${{ steps.announce_inputs.outputs.json }} |
167 |
| - - name: Wait for announce workflow to finish (run ${{ steps.announce_dispatch.outputs.run_id }}) |
168 |
| - uses: codex-/await-remote-run@v1 |
169 |
| - with: |
170 |
| - token: ${{ secrets.WIMODS_NET_PUBLISH_TOKEN }} |
171 |
| - owner: Wurst-Imperium |
172 |
| - repo: wimods.net |
173 |
| - run_id: ${{ steps.announce_dispatch.outputs.run_id }} |
| 119 | + workflow_inputs: | |
| 120 | + { |
| 121 | + "mod": "chestesp", |
| 122 | + "mod_version": "${{ inputs.mod_version }}", |
| 123 | + "branches": "${{ inputs.branches }}", |
| 124 | + "dry_run": "${{ inputs.dry_run }}" |
| 125 | + } |
174 | 126 | run_timeout_seconds: 600 # 10 minutes
|
0 commit comments