Skip to content

Added kotlin support (#2) #5

Added kotlin support (#2)

Added kotlin support (#2) #5

Workflow file for this run

name: "Plugin: Release"
on:
push:
tags:
- 'v*'
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
outputs:
version: ${{steps.build.outputs.version}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ github.token }}
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 17
cache: gradle
- name: Set version
id: vars
run: |
[[ "$GITHUB_REF" =~ ^refs/tags/v.*$ ]] && echo "tag=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT || echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Init properties
env:
GRADLE_KEY: ${{ secrets.GRADLE_KEY }}
GRADLE_SECRET: ${{ secrets.GRADLE_SECRET }}
run: |
echo -e "gradle.publish.key=${GRADLE_KEY}\\ngradle.publish.secret=${GRADLE_SECRET}\\n" > ~/.gradle/gradle.properties
- name: Publish
run: ./gradlew -Pversion=${{ steps.vars.outputs.tag }} build publishPlugins
env:
CI_BRANCH_NAME: ${{ github.ref_name }}
CI_SHORT_COMMIT: ${{ steps.vars.outputs.sha_short }}