Merge pull request #224 from eemuman/giants-foundry-use-items #122
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: Build and Publish Plugins | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.NEXUS_USERNAME }} | |
| ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.NEXUS_PASSWORD }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| - name: Grant execute permissions | |
| run: chmod +x gradlew | |
| - name: Build JARs | |
| run: ./gradlew clean build | |
| - name: Generate plugin documentation | |
| run: ./gradlew copyPluginDocs | |
| - name: Generate plugins.json | |
| run: ./gradlew generatePluginsJson | |
| - name: Publish to Nexus | |
| run: ./gradlew publish | |
| - name: Create/Update GitHub Release with JARs | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: latest-release | |
| name: Latest build | |
| body: "Commit: ${{ github.sha }}" | |
| allowUpdates: true | |
| replacesArtifacts: true | |
| artifacts: "**/build/libs/*.jar" | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./public | |
| publish_branch: gh-pages | |
| enable_jekyll: false | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' | |
| allow_empty_commit: true |