Skip to content

Release

Release #23

Workflow file for this run

# Releases the plugin to GitHub and JetBrains
name: Release
on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
jobs:
# Create new draft release on GitHub and upload zipped artifact
build-upload:
name: Build and Upload Plugin
environment: prod
runs-on: ubuntu-latest
steps:
# Checkout the current repository on main
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
# Install the necessary Java environment
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
# Build the plugin artifact
- name: Build Plugin
uses: gradle/actions/setup-gradle@v3
id: setup-
with:
gradle-version: 8.2
- run: buildPlugin -Pversion=${{ github.event.inputs.version }}
# Create GitHub draft release
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "./build/distributions/orion-${{ github.event.inputs.version }}.zip"
artifactContentType: application/zip
tag: v${{ github.event.inputs.version }}
name: Orion ${{ github.event.inputs.version }}
draft: true
prerelease: false
# Publish new version to the JetBrains marketplace
jb-publish:
name: Upload Plugin to JetBrains
environment: prod
runs-on: ubuntu-latest
steps:
# Checkout the current repository on main
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
# Install the necessary Java environment
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
# Inject the plugin owner's credentials for the JetBrains repository into the build.gradle.kts
- name: Inject Token
run: sed -i -e 's/<your_token>/${{ secrets.PLUGIN_REPOSITORY_TOKEN }}/g' build.gradle.kts
# Build and upload the plugin to the JetBrains marketplace
- name: Publish Plugin
uses: eskatos/gradle-command-action@v1.4.0
with:
arguments: publishPlugin -Pversion=${{ github.event.inputs.version }}