v1.0.4 #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Maven Release | |
| on: | |
| release: | |
| types: [ published ] | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| name: Build jar & docs | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{steps.deployment.outputs.page_url}} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Set release version | |
| run: | | |
| TAG=${{ github.event.release.tag_name }} | |
| echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT | |
| id: version | |
| - name: Set project version | |
| run: mvn -B versions:set -DnewVersion=${{ steps.version.outputs.VERSION }} -DgenerateBackupPoms=false | |
| - name: Build and package Maven project | |
| run: mvn clean package | |
| - name: Upload to release | |
| uses: cloudnode-pro/[email protected] | |
| with: | |
| gh-token: ${{ github.token }} | |
| files: target/CloudnodeMSG-${{ steps.version.outputs.VERSION }}.jar; type=application/java-archive | |
| - name: Upload to Modrinth | |
| uses: cloudnode-pro/modrinth-publish@v2 | |
| with: | |
| token: ${{ secrets.MODRINTH_TOKEN }} | |
| project: ${{ github.event.repository.custom_properties.modrinth_id }} | |
| name: ${{ github.event.release.name == github.event.release.tag_name && format('BankAccounts {0}', github.event.release.name) || github.event.release.name }} | |
| version: ${{ github.event.release.tag_name }} | |
| changelog: ${{ github.event.release.body }} | |
| loaders: paper | |
| game-versions: |- | |
| 1.20.x | |
| 1.21.x | |
| files: target/CloudnodeMSG-${{ steps.version.outputs.VERSION }}.jar | |
| - name: Generate Javadoc | |
| run: mvn -B javadoc:javadoc --file pom.xml | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: target/site/apidocs | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |