Skip to content

Merge pull request #295 from chsami/development #142

Merge pull request #295 from chsami/development

Merge pull request #295 from chsami/development #142

Workflow file for this run

name: Build and Publish Plugins (main)
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: write # required for release creation and gh-pages push
env:
CI: true
PLUGINS_RELEASE_TAG: latest-release
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 -PpluginsReleaseTag=${{ env.PLUGINS_RELEASE_TAG }}
- name: Generate plugin documentation
run: ./gradlew copyPluginDocs -PpluginsReleaseTag=${{ env.PLUGINS_RELEASE_TAG }}
- name: Generate plugins.json
run: ./gradlew generatePluginsJson -PpluginsReleaseTag=${{ env.PLUGINS_RELEASE_TAG }}
- name: Create/Update GitHub Release with JARs (latest-release)
uses: ncipollo/release-action@v1
with:
tag: ${{ env.PLUGINS_RELEASE_TAG }}
name: Latest build (${{ env.PLUGINS_RELEASE_TAG }})
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