Add workflow to send artifacts back to minecraft-data (#51)
* add a send script * update * fix marker
This commit is contained in:
@@ -10,6 +10,9 @@ on:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
env:
|
||||
MARKER: '🎈'
|
||||
|
||||
jobs:
|
||||
define-versions:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -92,8 +95,19 @@ jobs:
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload artifact
|
||||
id: uploadMerged
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: merged-data
|
||||
path: artifacts/*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Sending artifacts to minecraft-data
|
||||
# Check if PR starts with marker
|
||||
if: startsWith(github.event.pull_request.title, env.MARKER)
|
||||
env:
|
||||
ARTIFACT_URL: ${{ steps.uploadMerged.outputs.artifact-url }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: node .github/commands/send.js
|
||||
|
||||
@@ -6,6 +6,13 @@ on:
|
||||
description: 'What new version is like `1.21.6`'
|
||||
required: true
|
||||
default: '1.21.6'
|
||||
pr_number:
|
||||
description: 'What is the relevant minecraft-data PR URL?'
|
||||
required: false
|
||||
issue_number:
|
||||
description: 'What is the relevant minecraft-data issue?'
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
update-mcdata:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -16,4 +23,7 @@ jobs:
|
||||
- run: npm install # install gh-helpers
|
||||
- run: node .github/commands/bump.js ${{ github.event.inputs.version }}
|
||||
env:
|
||||
MC_VERSION: ${{ github.event.inputs.version }}
|
||||
MCDATA_PULL_NO: ${{ github.event.inputs.pr_number }}
|
||||
MCDATA_ISSUE_NO: ${{ github.event.inputs.issue_number }}
|
||||
GITHUB_TOKEN: ${{ secrets.PAT_PASSWORD }}
|
||||
|
||||
Reference in New Issue
Block a user