Skip to content

Commit

Permalink
Add GitHub Actions workflow for plugin release
Browse files Browse the repository at this point in the history
This workflow triggers on pushes with version tags. It builds the plugin, signs the JAR, creates a draft release, and uploads the signed JAR as a release asset.
  • Loading branch information
cortiz committed Sep 17, 2024
1 parent d773178 commit 86aeaf0
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release Plugin

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Build the Plugin
run: ./gradlew buildPlugin

- name: Sign the Plugin JAR
run: ./gradlew signPlugin
env:
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this release:
- TBD
draft: true
prerelease: false

- name: Upload Signed JAR to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/distributions/*.zip
asset_name: plugin-signed.jar
asset_content_type: application/java-archive

0 comments on commit 86aeaf0

Please sign in to comment.