From d85b9ef1a11209cbe09a8012b03f4391d0d1a5f9 Mon Sep 17 00:00:00 2001 From: WakelessSloth56 Date: Mon, 19 Feb 2024 23:27:07 +0800 Subject: [PATCH] ci: update auto-release script --- .github/workflows/auto-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 03c07e0..9e3b233 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -14,13 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | prop() { grep -P "^\s*[^#]?${1}=.*$" './gradle.properties' | cut -d'=' -f2; } echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV echo "MOD_VERSION=`echo $(prop "mod_version")`" >> $GITHUB_ENV - echo "MINECRAFT_VERSION=`echo $(prop "minecraft_version")`" >> $GITHUB_ENV - run: if [ "${{env.GIT_TAG}}" != "v${{env.MOD_VERSION}}" ];then exit 1;fi @@ -41,6 +40,7 @@ jobs: java-version: '17' distribution: 'temurin' architecture: 'x64' + cache: 'gradle' - name: Build and publish with Gradle env: @@ -55,7 +55,7 @@ jobs: ./gradlew runData ./gradlew build publish generateUpdateJson mkdir ./pages - cp "./build/tmp/${{env.MINECRAFT_VERSION}}.json" ./pages + cp -r ./build/tmp/update/. ./pages/ - name: Update update JSON uses: JamesIves/github-pages-deploy-action@v4