Skip to content

ci: gradle stack overflow fix #13

ci: gradle stack overflow fix

ci: gradle stack overflow fix #13

Workflow file for this run

name: Publish
on:
push:
branches: [ master ]
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: shorty
run: echo "shorty=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@v4
- name: Publish to Hangar
run: ./gradlew :Publication:publishPluginPublicationToHangar --no-daemon --stacktrace
env:
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
HANGAR_ID: ${{ secrets.HANGAR_ID }}
HANGAR_PLATFORM_VERSIONS: ${{ secrets.HANGAR_PLATFORM_VERSIONS }}
HANGAR_PUB_CHANNEL: ${{ github.ref == 'refs/heads/master' && 'Preview' || 'Release' }}
HANGAR_SHORTY: ${{ steps.shorty.outputs.shorty }}
- uses: actions/upload-artifact@v4
with:
path: build/libs/SilkSpawners_v2.jar
release:
if: github.ref == 'refs/tags/*'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- uses: actions/download-artifact@v4
- id: tag
run: echo "latest=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
- id: changes
run: |
echo "changes=" >> $GITHUB_OUTPUT
if [ ${{ github.ref }} == "refs/heads/master" ] ; then
echo "changes=`git log --oneline $(git tag -l --format='%(objectname)' | tail -n1)..HEAD --pretty=format:%s | grep -E '(feat)|(fix)'`" \
>> $GITHUB_OUTPUT
fi
- uses: softprops/action-gh-release@v2
with:
draft: false
prerelease: false
name: ${{ steps.tag.outputs.latest }}
tag_name: ${{ steps.tag.outputs.latest }}
body: ${{ steps.changes.outputs.changes }}
files: artifact/*