Skip to content

Add support dropped message #920

Add support dropped message

Add support dropped message #920

Workflow file for this run

# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.
name: build
on: [ pull_request, push, workflow_dispatch ]
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ ubuntu-22.04, windows-2022 ]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
permissions:
contents: write
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: Sync translations
if: "github.repository == 'mc-wiki/minecraft-mod-heywiki' && (github.ref_name == 'master' || startsWith(github.ref_name, 'mc/')) && runner.os == 'Linux' && matrix.java == '21'"
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
import_eq_suggestions: false
download_sources: false
download_translations: true
push_translations: true
commit_message: New Crowdin translations [skip ci]
localization_branch_name: ${{ github.ref_name }}
create_pull_request: false
crowdin_branch_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: 665004
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
uses: burrunan/gradle-cache-action@v1
with:
job-id: "${{ runner.os }}-jdk${{ matrix.java }}"
arguments: build
gradle-version: wrapper
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: '**/build/libs/'