Skip to content

Commit

Permalink
🚧 CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kitUIN committed Dec 5, 2024
1 parent 4f92423 commit ff43327
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/test_forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ permissions:
jobs:

generate-matrix:
runs-on: windows-latest
runs-on: ubuntu-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"
chmod 777 matrix.sh && ./matrix.sh -path "forge"
test:
runs-on: windows-latest
runs-on: ubuntu-latest
needs: generate-matrix
strategy:
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
Expand All @@ -51,17 +50,18 @@ jobs:
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
mod_version=$(cat version.txt)
echo "Version: $mod_version"
echo "MOD_VERSION=$mod_version" >> "$GITHUB_ENV"
- name: Init Files
shell: pwsh
run: |
./init.ps1
chmod 777 init.sh && ./init.sh
- name: Build
run: |
cd ${{ matrix.config.mc-loader }}/${{ matrix.config.mc-loader }}-${{ matrix.config.mc-version }}
./gradlew clean build
chmod 777 gradlew && ./gradlew clean build
cd ../..
- name: Show Files
run: |
ls ChatImage-jar/${{ env.MOD_VERSION }}
22 changes: 11 additions & 11 deletions .github/workflows/test_neoforge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ permissions:
jobs:

generate-matrix:
runs-on: windows-latest
runs-on: ubuntu-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 "neoforge"
chmod 777 matrix.sh && ./matrix.sh -path "neoforge"
test:
runs-on: windows-latest
runs-on: ubuntu-latest
needs: generate-matrix
strategy:
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
Expand All @@ -38,17 +37,18 @@ jobs:
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
mod_version=$(cat version.txt)
echo "Version: $mod_version"
echo "MOD_VERSION=$mod_version" >> "$GITHUB_ENV"
- name: Init Files
shell: pwsh
run: |
./init.ps1
chmod 777 init.sh && ./init.sh
- name: Build
run: |
cd ${{ matrix.config.mc-loader }}/${{ matrix.config.mc-loader }}-${{ matrix.config.mc-version }}
./gradlew clean build
chmod 777 gradlew && ./gradlew clean build
cd ../..
- name: Show Files
run: |
ls ChatImage-jar/${{ env.MOD_VERSION }}

0 comments on commit ff43327

Please sign in to comment.