Create release #1
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: Create release | |
| on: | |
| workflow_dispatch | |
| jobs: | |
| create_release: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.1.5 | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v4.2.1 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Set variables | |
| run: | | |
| metadata=$(./gradlew printMetadata -q) | |
| echo "plugin_jar=$(echo "$metadata" | grep 'filename=' | cut -d'=' -f2)" >> $GITHUB_ENV | |
| echo "plugin_version=$(echo "$metadata" | grep 'version=' | cut -d'=' -f2)" >> $GITHUB_ENV | |
| - name: Build plugin | |
| run: ./gradlew build | |
| - name: Create github release | |
| # You may pin to the exact commit or the version. | |
| # uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 | |
| uses: softprops/action-gh-release@v2.0.5 | |
| with: | |
| tag_name: ${{ env.plugin_version }} | |
| files: build/libs/${{ env.plugin_jar }} |