Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LasmGratel committed Sep 21, 2024
1 parent ff96fcc commit 936605c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Restore Cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Cache Gradle packages
uses: actions/cache@v4
with:
Expand All @@ -51,6 +59,18 @@ jobs:
- name: Build Project
run: ./gradlew build --warning-mode all --build-cache

- run: ls forge/build/libs
- run: ls fabric/build/libs

- name: Publish to GitHub
uses: softprops/action-gh-release@v2
with:
files: |
forge/build/libs/betterp2p-${{ steps.tag.outputs.version }}-forge.jar
fabric/build/libs/betterp2p-${{ steps.tag.outputs.version }}-fabric.jar
generate_release_notes: true
fail_on_unmatched_files: true

- name: "Upload Forge to CurseForge"
uses: itsmeow/curseforge-upload@v3
with:
Expand Down Expand Up @@ -100,3 +120,12 @@ jobs:
"fabric/build/libs/betterp2p-${{ steps.tag.outputs.version }}-fabric.jar"
dependencies: "P7dR8mSH:required, XxWD5pD3:required, Ha28R6CL:required, lhGA9TYQ:required"
version_type: release

- name: Always Save Cache
id: cache-save
if: always() && steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/.gradle/caches
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
restore-keys: ${{ runner.os }}-gradle

0 comments on commit 936605c

Please sign in to comment.