Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Apr 5, 2024
1 parent 3e620fe commit f780e9a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Get github short hash
id: github_short_hash
run: echo "result=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -25,8 +28,18 @@ jobs:
run: |
chmod +x gradlew
./gradlew build
- name: Upload artifacts
- name: Upload artifacts (fabric)
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: ${{ github.workspace }}/build/libs
name: Artifacts-fabric
path: ${{ github.workspace }}/fabric/build/libs
- name: Upload artifacts (forge)
uses: actions/upload-artifact@v3
with:
name: Artifacts-forge
path: ${{ github.workspace }}/forge/build/libs
- name: Upload artifacts (neoforge)
uses: actions/upload-artifact@v3
with:
name: Artifacts-forge
path: ${{ github.workspace }}/neoforge/build/libs
12 changes: 4 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
name: Publish Release

on:
workflow_dispatch:
release:
types:
- published
on: [ release, workflow_dispatch ]

permissions:
contents: write

jobs:
Build:
Publish:
runs-on: ubuntu-latest

steps:
Expand All @@ -27,12 +23,12 @@ jobs:
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts*', '**/gradle-wrapper.properties', 'build.gradle.kts') }}
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts*', '**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle.kts', 'build.gradle') }}
- uses: gradle/wrapper-validation-action@v1
- run: |
chmod +x gradlew
./gradlew build publishMod --stacktrace -Porg.gradle.parallel.threads=4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}

0 comments on commit f780e9a

Please sign in to comment.