Skip to content

Commit

Permalink
change: Fix publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Aug 23, 2024
1 parent 635f139 commit 1997c7f
Show file tree
Hide file tree
Showing 9 changed files with 170 additions and 374 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Java CI with Gradle

on: [ pull_request, push ]
on: [pull_request, push]

jobs:
build:
Expand All @@ -19,8 +19,13 @@ jobs:
check-latest: true
- name: Build with Gradle
run: ./gradlew build
- name: Upload Build Artifacts
- name: Upload Build Artifacts - Fabric
uses: actions/upload-artifact@v4
with:
name: 'Sodium Extra Artifacts'
path: build/libs
name: 'Sodium Extra Fabric Artifacts'
path: fabric/build/libs
- name: Upload Build Artifacts - NeoForge
uses: actions/upload-artifact@v4
with:
name: 'Sodium Extra NeoForge Artifacts'
path: neoforge/build/libs
29 changes: 25 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- published

jobs:
publish:
build:
if: github.repository_owner == 'FlashyReese'
runs-on: self-hosted
steps:
Expand All @@ -25,8 +25,19 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Publish to Modrinth & CurseForge
uses: Kir-Antipov/[email protected]
publish:
needs: build
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- platform: fabric
name: Fabric
- platform: neoforge
name: NeoForge
steps:
- name: Publish ${{ matrix.name }} to Modrinth, CurseForge & GitHub
uses: Kir-Antipov/[email protected]
with:
modrinth-id: PtjYWJkn
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
Expand All @@ -36,11 +47,21 @@ jobs:

github-token: ${{ secrets.GITHUB_TOKEN }}

name: '[${{ matrix.name }}] ${{ github.event.release.name }}'
version: '${{ github.event.release.tag_name }}+${{ matrix.platform }}'
version-type: release
loaders: fabric

loaders: ${{ matrix.platform }}

dependencies: |
sodium | depends | *
fabric-api | depends | *
reeses-sodium-options | recommends | *
irisshaders | recommends | *
iris | recommends | *
files: |
${{ matrix.platform }}/build/libs/!(*-@(dev|sources|javadoc|dev-shadow)).jar
${{ matrix.platform }}/build/libs/*-@(dev|sources|javadoc|dev-shadow).jar
version-resolver: latest
13 changes: 9 additions & 4 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Self-Hosted runner CI with Gradle

on: [ push ]
on: [push]

jobs:
selfhost-build:
Expand All @@ -23,8 +23,13 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload Auild Artifacts
- name: Upload Build Artifacts - Fabric
uses: actions/upload-artifact@v4
with:
name: 'Sodium Extra Artifacts'
path: build/libs
name: 'Sodium Extra Fabric Artifacts'
path: fabric/build/libs
- name: Upload Build Artifacts - NeoForge
uses: actions/upload-artifact@v4
with:
name: 'Sodium Extra NeoForge Artifacts'
path: neoforge/build/libs
Loading

0 comments on commit 1997c7f

Please sign in to comment.