Skip to content

Commit

Permalink
Update gradle.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
khjxiaogu authored Jan 15, 2025
1 parent 8b1898b commit a0de2db
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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).
Expand Down

0 comments on commit a0de2db

Please sign in to comment.