fix: Modrinth upload action missing steps

This commit is contained in:
Ben Woo 2023-08-21 23:15:25 +08:00
parent 356d67edf4
commit d31f7e9d87
No known key found for this signature in database
GPG Key ID: FB2A3645536E12C8

View File

@ -19,16 +19,28 @@ jobs:
with:
tag: ${{ steps.release.outputs.tag_name }}
- name: Modify version scheme
run: |
if [[ "${{ steps.release.outputs.tag_name }}" == *"pre"* ]]; then
echo "Replacing prerelease version scheme with SNAPSHOT"
echo "VERSION=$(echo ${{ steps.release.outputs.tag_name }} | sed -E 's/-pre.*/-SNAPSHOT/')" >> $GITHUB_ENV
else
echo "Using release version scheme"
echo "VERSION=${{ steps.release.outputs.tag_name }}" >> $GITHUB_ENV
fi
- name: Parse release type
run: |
if [[ "${{ steps.release-info.outputs.prerelease }}" == "true" ]]; then
echo "Replacing prerelease version scheme with SNAPSHOT"
echo "RELEASE_TYPE=beta" >> $GITHUB_ENV
else
echo "Using release version scheme"
echo "RELEASE_TYPE=release" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
with:
ref: ${{ steps.release-info.outputs.tag_name }}
- name: Upload to modrinth.com
uses: gradle/gradle-build-action@v2
with: