Skip to content

💚 update forge ci #19

💚 update forge ci

💚 update forge ci #19

Workflow file for this run

name: 测试Forge
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'forge/**'
- 'origin/**'
permissions:
contents: write
jobs:
generate-matrix:
runs-on: windows-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Generate Matrix
id: set-matrix
shell: pwsh
run: |
.\matrix.ps1 -path "forge"
test:
runs-on: windows-latest
needs: generate-matrix
strategy:
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4

Check failure on line 34 in .github/workflows/test_forge.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test_forge.yml

Invalid workflow file

You have an error in your yaml syntax on line 34
- name: Chose JDK 8
uses: actions/setup-java@v4
if: '${{ matrix.config.mc-loader }}-${{ matrix.config.mc-version }}' = 'forge-1.16.5'
with:
java-version: '8'
distribution: 'temurin'
- name: Chose JDK 21
uses: actions/setup-java@v4
if: '${{ matrix.config.mc-loader }}-${{ matrix.config.mc-version }}' != 'forge-1.16.5'
with:
java-version: '21'
distribution: 'temurin'
- name: Read version.txt and save to variable
shell: pwsh
run: |
$mod_version = Get-Content version.txt
Write-Host "Version: $mod_version"
echo "MOD_VERSION=$mod_version" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_ENV
- name: Init Files
shell: pwsh
run: |
./init.ps1
- name: Build
run: |
cd ${{ matrix.config.mc-loader }}/${{ matrix.config.mc-loader }}-${{ matrix.config.mc-version }}
./gradlew clean build
cd ../..