Use mcmeta (#197)

* Simplify data fetching by using mcmeta

* Fetch sounds from mcmeta
This commit is contained in:
Misode
2022-01-28 01:25:10 +01:00
committed by GitHub
parent ec432288e7
commit 623e38d98c
9 changed files with 85 additions and 672 deletions

View File

@@ -12,27 +12,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v1
- name: Get latest mcdata commit hash
uses: octokit/request-action@v2.x
id: get_mcdata_hash
with:
route: GET /repos/Arcensoth/mcdata/branches/master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get latest vanilla-datapack commit hash
uses: octokit/request-action@v2.x
id: get_vanilla_datapack_summary_hash
with:
route: GET /repos/SPGoding/vanilla-datapack/branches/summary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get latest version
id: get_latest_version
run: |
echo ::set-output name=data::$(curl -s "https://raw.githubusercontent.com/misode/mcmeta/summary/version.json")
- name: Build
run: |
npm install
export mcdata_hash="'${{ fromJson(steps.get_mcdata_hash.outputs.data).commit.sha }}'"
export vanilla_datapack_summary_hash="'${{ fromJson(steps.get_vanilla_datapack_summary_hash.outputs.data).commit.sha }}'"
export latest_version="'${{ fromJson(steps.get_latest_version.outputs.data).commit.sha }}'"
npm run build
- name: Deploy