Skip to content

Release

Release #69

name: Release
on:
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- run: chmod +x ./gradlew
- uses: gradle/gradle-build-action@v3
with:
cache-read-only: true
dependency-graph: generate-and-submit
- 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 curseforge modrinth githubRelease registerVersion publish --continue'
enable_signature_check: true
secrets: inherit