Skip to content

Fix not being able to update the modelled TARDIS double door #24

Fix not being able to update the modelled TARDIS double door

Fix not being able to update the modelled TARDIS double door #24

Workflow file for this run

# This workflow will build TARDIS with Gradle
# and upload the JAR file to the latest release
# plus create a version on Modrinth
name: Java CI with Gradle
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
VERSION: '6.2.3'
RELEASE_TAG: '1.21.8'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get all pushed commits
run: echo "GIT_COMMITS=`git log --pretty=format:"%H %s" ${{ github.event.before }}..${{ github.event.after }}`" >> $GITHUB_ENV
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
# get short sha
- name: Set SHORT_SHA env property
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
# set executable permissions on gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# build and publish to hangar.papermc.io
- name: Build with Gradle Wrapper
env:
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
run: ./gradlew build publishPluginPublicationToHangar
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
assets: 'TARDIS-*.jar' # filename of asset to delete
tag: "${{ env.RELEASE_TAG }}" # the tag of the release to modify
token: ${{ secrets.TARDIS_WORKFLOW }} # Required for authentication
- name: Upload build artifacts to release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.TARDIS_WORKFLOW }}
tag_name: "${{ env.RELEASE_TAG }}"
files: build/libs/TARDIS-${{ env.VERSION }}-b${{ env.SHORT_SHA }}.jar
fail_on_unmatched_files: false
#body: "- ${{ github.event.head_commit.message }}"
body: "- ${{ env.GIT_COMMITS }}"
append_body: true
- name: Modrinth Publish
uses: cloudnode-pro/modrinth-publish@v2.1.3
with:
token: ${{ secrets.MODRINTH_TOKEN }} # Modrinth API token
project: 'ymLTIuUH' # ID of the project this version is for
name: "TARDIS ${{ env.VERSION }}-b${{ env.SHORT_SHA }}"
version: "${{ env.VERSION }}-b${{ env.SHORT_SHA }}"
#changelog: "- ${{ github.event.head_commit.message }}" # The changelog for this version
changelog: "- ${{ env.GIT_COMMITS }}" # The changelog for this version
# mod loaders that this version supports
loaders: |-
paper
# list of versions of Minecraft that this version supports
game-versions: |-
${{ env.RELEASE_TAG }}
# list of file paths to upload
files: |-
build/libs/TARDIS-${{ env.VERSION }}-b${{ env.SHORT_SHA }}.jar