Remove template outdated message. #141
Workflow file for this run
This file contains 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: Publish Plugin | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: | | |
11 | |
17 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/jdks | |
~/.gradle/native | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', 'gradle/**', 'gradle.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Setup publish token | |
env: | |
JETBRAINS_TOKEN: ${{ secrets.JETBRAINS_TOKEN }} | |
shell: bash | |
run: | | |
mkdir -p ~/.gradle/ | |
echo "GRADLE_USER_HOME=$HOME/.gradle" >> "$GITHUB_ENV" | |
echo "mcdev.deploy.token=${JETBRAINS_TOKEN}" > ~/.gradle/gradle.properties | |
- name: Publish plugin | |
run: ./gradlew clean publishPlugin --no-daemon --stacktrace | |
- name: Get tag name | |
id: get_tag | |
shell: bash | |
# Tag name is reversed from release name due to how IntelliJ parses plugin version numbers | |
run: | | |
tag_name="$(echo $GITHUB_REF | cut -d / -f 3)" | |
echo ::set-output name=tag::$tag_name | |
version_array=(${tag_name//-/ }) | |
echo ::set-output name=release::${version_array[1]}-${version_array[0]} | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_tag.outputs.tag }} | |
name: 'Release ${{ steps.get_tag.outputs.release }}' | |
body: '## [View all plugin releases here.](https://plugins.jetbrains.com/plugin/8327-minecraft-development/versions/stable/)' | |
prerelease: false | |
draft: false | |
files: build/distributions/*.zip |