77 # Set up the OS
88 runs-on : ubuntu-latest
99 env :
10- # Nexus credentials and GitHub token
11- NEXUS_USERNAME : ' ${{ secrets.NEXUS_USERNAME }}'
12- NEXUS_PASSWORD : ' ${{ secrets.NEXUS_PASSWORD }}'
10+ # Sonatype Credentials & GitHub token
11+ SONATYPE_USERNAME : ' ${{ secrets.SONATYPE_USERNAME }}'
12+ SONATYPE_PASSWORD : ' ${{ secrets.SONATYPE_PASSWORD }}'
1313 GITHUB_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
1414 # Set environment
15- env : ' prod'
15+ ENV : ' prod'
16+ PROJECT_NAME : ' TranslationsModule'
1617 steps :
1718 # Checkout the Code
1819 - name : Checkout Code
1920 uses : actions/checkout@v3
2021 # Set up git hashes environment variables
2122 - name : Git Hashes
22- uses : Im-Fran/git-hashes-action@v1.0.0
23+ uses : Im-Fran/git-hashes-action@v1.0.3
2324 # Set up version from tag environment variables
2425 - name : Version from Tag Action
25- uses : Im-Fran/version-from-tag-action@v1.0.1
26+ uses : Im-Fran/version-from-tag-action@v1.0.3
2627 with :
2728 remove-first-character : ' v'
2829 # Set up the JDK
@@ -31,27 +32,30 @@ jobs:
3132 with :
3233 distribution : adopt
3334 java-version : 11
35+ cache : ' gradle'
3436 # Make gradle executable
3537 - name : Make gradle executable
3638 run : chmod +x gradlew
3739 # Clean, Test, Publish and Build (in that order to save the artifact to the action)
3840 - name : Test, Deploy and Build with Gradle
39- run : ./gradlew clean test publish shadow dokkaHtml
41+ run : ./gradlew clean test shadowJar dokkaHtml publish publishToSonatype closeAndReleaseSonatypeStagingRepository -no-daemon
4042 # Now we store the artifact in the action
4143 - name : Upload the artifact
4244 uses : actions/upload-artifact@v3
4345 with :
44- name : TranslationsModule
45- path : ./build/libs/TranslationsModule -${{ env.VERSION }}.jar
46+ name : ${{ env.PROJECT_NAME }}
47+ path : ./build/libs/${{ env.PROJECT_NAME }} -${{ env.VERSION }}.jar
4648 # Here we upload the binary to the release
4749 - name : Upload to release
4850 uses : JasonEtco/upload-to-release@master
4951 with :
50- args : ./build/libs/TranslationsModule -${{ env.VERSION }}.jar application/java-archive
52+ args : ./build/libs/${{ env.PROJECT_NAME }} -${{ env.VERSION }}.jar application/java-archive
5153 # Now we deploy the documents to GitHub pages
5254 - name : Deploy Dokka
5355 uses : JamesIves/github-pages-deploy-action@v4.4.1
5456 with :
5557 branch : gh-pages
5658 folder : build/dokka
57- clean : true
59+ clean : true
60+ clean-exclude : |
61+ CNAME
0 commit comments