Skip to content

Release

Release #112

name: Release
on:
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- run: chmod +x ./gradlew
- uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true
- name: JUnit
run: ./gradlew test
- name: Get run resources
run: |
(./gradlew downloadMCMeta downloadAssets writeMinecraftClasspathGameTestServer) || \
(sleep 5 && ./gradlew downloadMCMeta downloadAssets writeMinecraftClasspathGameTestServer) || \
(sleep 5 && ./gradlew downloadMCMeta downloadAssets writeMinecraftClasspathGameTestServer) || true
- name: GameTest
run: ./gradlew runGameTestServer
env:
TEST_UTILITY_LOG_ALL_TEST: false
IGNORE_OTHER_MODS_IN_RUNTIME: true
RUN_GAME_TEST: true
- name: Check version
run: ./gradlew checkReleaseVersion
env:
RELEASE_DEBUG: false
release:
needs:
- check
permissions:
id-token: write
contents: write
packages: write
attestations: write
# See https://github.com/Kotori316/common-script/blob/main/.github/workflows/release-prod-gradle.yaml
uses: 'Kotori316/common-script/.github/workflows/release-prod-gradle.yaml@main'
with:
release_command: 'checkReleaseVersion assemble publishToMavenLocal publishMods registerVersion githubRelease publish --continue'
enable_signature_check: false
java_version: 21
use_gradle_cache: true
secrets: inherit