From a0de2db1e38f728252c3824ce9ac101b365c8f75 Mon Sep 17 00:00:00 2001 From: khj xiaogu <54445543+khjxiaogu@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:38:55 +0800 Subject: [PATCH] Update gradle.yml --- .github/workflows/gradle.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2110876bd..4f0c01f01 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -38,30 +38,31 @@ jobs: run: chmod +x ./gradlew - name: run datagen with Gradle Wrapper run: ./gradlew runData + - name: Read value from Properties-file + id: read_property + uses: christian-draeger/read-properties@1.1.1 + with: + path: './gradle.properties' + properties: 'mod_version' - name: Build with Gradle Wrapper - run: ./gradlew jar + run: ./gradlew jar -Pmod_version="${{steps.read_property.outputs.mod_version}}-snapshot${{github.run_number}}" + - name: Download cosmaven + run: wget https://github.com/TeamMoegMC/CosMavenProxy/releases/latest/download/cosmavenproxy.jar + - name: Start local cos maven + shell: bash + env: + COS_KEY: ${{ secrets.COS_SECRETKEY }} + COS_ID: ${{ secrets.COS_SECRETID }} + run: | + java -DCOS_SECRETID="$COS_KEY" -DCOS_SECRETKEY="$COS_SECRETID" -Dport=9999 -jar cosmavenproxy.jar & + - name: Publish to maven local + run: ./gradlew publishMavenPublications -Pmod_version="${{steps.read_property.outputs.mod_version}}-snapshot${{github.run_number}}" - name: Upload artifacts uses: actions/upload-artifact@v4 with: - # Name of the artifact to upload. - # Optional. Default is 'artifact' name: frostedheart-binary - - # A file, directory or wildcard pattern that describes what to upload - # Required. path: build/libs/*.jar - - # The desired behavior if no files are found using the provided path. - # Available Options: - # warn: Output a warning but do not fail the action - # error: Fail the action with an error message - # ignore: Do not output any warnings or errors, the action does not fail - # Optional. Default is 'warn' if-no-files-found: error - # If true, an artifact with a matching name will be deleted before a new one is uploaded. - # If false, the action will fail if an artifact for the given name already exists. - # Does not fail if the artifact does not exist. - # Optional. Default is 'false' overwrite: true # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).