Skip to content

GradleStart: allow easy bounce/tweak class override #73

GradleStart: allow easy bounce/tweak class override

GradleStart: allow easy bounce/tweak class override #73

Workflow file for this run

name: Release tagged build
on:
push:
tags: [ '*' ]
permissions:
contents: write
jobs:
release-build:
runs-on: ubuntu-latest
steps:
- name: Checkout mod repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 8 and 17
uses: actions/setup-java@v3
with:
java-version: |
8
17
distribution: 'zulu'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build the Gradle plugin
run: ./gradlew --info --stacktrace retrofuturagradle:shadowJar
- name: Build the javac plugin
run: ./gradlew --info --stacktrace retrofuturagradle:rfgJavacPlugin:shadowJar
# Continue on error in the following steps to make sure releases still get made even if one of the methods fails
- name: Delete old release if it already exists
run: gh release delete --yes "${RELEASE_VERSION}"
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release under current tag
run: |
export "CHANGELOG_FILE=$(mktemp --suffix=.md)"
echo "CHANGELOG_FILE=${CHANGELOG_FILE}" >> $GITHUB_ENV
gh api --method POST -H "Accept: application/vnd.github+json" \
"/repos/${GITHUB_REPOSITORY}/releases/generate-notes" \
-f tag_name="${RELEASE_VERSION}" \
--jq ".body" > "${CHANGELOG_FILE}"
cat "${CHANGELOG_FILE}"
gh release create "${RELEASE_VERSION}" -F "${CHANGELOG_FILE}" ./plugin/build/libs/*.jar ./plugin/rfgJavacPlugin/build/libs/*.jar
shell: bash
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Maven
run: ./gradlew --info --stacktrace retrofuturagradle:publish retrofuturagradle:rfgJavacPlugin:publish
continue-on-error: true
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
if: ${{ env.MAVEN_USER != '' }}