@@ -52,25 +52,33 @@ jobs:
5252 needs : build
5353 runs-on : ubuntu-latest
5454 steps :
55- - name : Downloading artifact
55+ - name : Checkout code
5656 uses : actions/checkout@v4
57+
5758 - uses : thecodemonkey/action-get-gradle-version@master
5859 id : version
5960 with :
6061 file : " build.gradle.kts"
61- - uses : actions/download-artifact@v4.2.1
62+
63+ - name : Download build artifact
64+ uses : actions/download-artifact@v4.2.1
6265 with :
6366 name : " IridiumCore"
6467 path : " ./"
6568
66- - name : Publishing to Nexus
67- uses : sonatype-nexus-community/nexus-repo-github-action@master
68- with :
69- serverUrl : " https://nexus.iridiumdevelopment.net/"
70- username : " ${{ secrets.NEXUS_USERNAME }}"
71- password : " ${{ secrets.NEXUS_PASSWORD }}"
72- format : " maven2"
73- repository : " maven-releases"
74- coordinates : " groupId=com.iridium artifactId=IridiumCore version=${{steps.version.outputs.version}} generate-pom=on"
75- assets : " extension=jar"
76- filename : " IridiumCore-*.jar"
69+ - name : Find IridiumCore jar
70+ id : find_jar
71+ run : |
72+ FILE=$(find . -type f -name "IridiumCore-*.jar" | head -n 1)
73+ echo "file=$FILE" >> "$GITHUB_OUTPUT"
74+
75+ - name : Upload to Nexus with curl
76+ run : |
77+ curl --location 'https://nexus.iridiumdevelopment.net/service/rest/v1/components?repository=maven-releases' \
78+ --header 'Authorization: Basic ${{ secrets.NEXUS_AUTH }}' \
79+ -F "maven2.groupId=com.iridium" \
80+ -F "maven2.artifactId=IridiumCore" \
81+ -F "maven2.version=${{ steps.version.outputs.version }}" \
82+ -F "maven2.generate-pom=true" \
83+ -F "maven2.asset1=@${{ steps.find_jar.outputs.file }}" \
84+ -F "maven2.asset1.extension=jar"
0 commit comments