Add workflow to send artifacts back to minecraft-data (#51)

* add a send script

* update

* fix marker
This commit is contained in:
extremeheat
2025-08-23 22:42:30 +02:00
committed by GitHub
parent ded05137e5
commit 32dfe451dc
4 changed files with 63 additions and 2 deletions
+24
View File
@@ -0,0 +1,24 @@
const gh = require('gh-helpers')()
module.exports = async ([mergedArtifactURL], helpers) => {
// Have minecraft-data handle this successful update
const dispatchPayload = {
owner: 'PrismarineJS',
repo: 'minecraft-data',
workflow: 'handle-mcpc-generator.yml',
branch: 'main',
inputs: {
versions: JSON.stringify(require('../../versions.json')),
mergedArtifactURL: mergedArtifactURL,
prNumber: process.env.PR_NUMBER
}
}
console.log('Sending workflow dispatch', dispatchPayload)
await gh.sendWorkflowDispatch(dispatchPayload)
}
if (require.main === module) {
const merged = process.env.ARTIFACT_URL
console.log('Handling merged artifacts @', merged)
module.exports([merged], { reply: console.log })
}