mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Added version channels for update.pmmp.io
This commit is contained in:
parent
e0fdbe6eb1
commit
acebbeed16
22
.github/workflows/update-updater-api.yml
vendored
22
.github/workflows/update-updater-api.yml
vendored
@ -25,13 +25,25 @@ jobs:
|
|||||||
- name: Download new release information
|
- name: Download new release information
|
||||||
run: curl -f -L ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ steps.tag-name.outputs.TAG_NAME }}/build_info.json -o new_build_info.json
|
run: curl -f -L ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ steps.tag-name.outputs.TAG_NAME }}/build_info.json -o new_build_info.json
|
||||||
|
|
||||||
- name: Detect channel
|
- name: Detect channels
|
||||||
id: channel
|
id: channel
|
||||||
run: echo CHANNEL=$(jq -r '.channel' new_build_info.json) >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Copy release information
|
|
||||||
run: |
|
run: |
|
||||||
cp new_build_info.json channels/${{ steps.channel.outputs.CHANNEL }}.json
|
CHANNEL=$(jq -r '.channel' new_build_info.json)
|
||||||
|
VERSION=${{ steps.tag-name.outputs.TAG_NAME }}
|
||||||
|
echo CHANNEL=$CHANNEL >> $GITHUB_OUTPUT
|
||||||
|
if [ "$CHANNEL" == "stable" ]; then
|
||||||
|
echo MAJOR=$(echo $VERSION | cut -d. -f1) >> $GITHUB_OUTPUT
|
||||||
|
echo MINOR=$(echo $VERSION | cut -d. -f1-2) >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo MAJOR=$(echo $VERSION | cut -d. -f1)-$CHANNEL >> $GITHUB_OUTPUT
|
||||||
|
echo MINOR=$(echo $VERSION | cut -d. -f1-2)-$CHANNEL >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Update channel info
|
||||||
|
run: |
|
||||||
|
cp new_build_info.json "channels/${{ steps.channel.outputs.CHANNEL }}.json"
|
||||||
|
cp new_build_info.json "channels/${{ steps.channel.outputs.MAJOR }}.json"
|
||||||
|
cp new_build_info.json "channels/${{ steps.channel.outputs.MINOR }}.json"
|
||||||
rm new_build_info.json
|
rm new_build_info.json
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user