Skip to content

Commit

Permalink
1.18-FG5
Browse files Browse the repository at this point in the history
  • Loading branch information
mouse0w0 committed Aug 1, 2022
0 parents commit 31fa168
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build
on:
release:
types: [published]
defaults:
run:
shell: powershell
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Config
run: |
$version = "${{ github.event.release.name }}"
echo "MDK_VERSION=$version" >> $env:GITHUB_ENV
echo "MDK_NAME=forge-$version-mdk" >> $env:GITHUB_ENV
echo "MDK_ARCHIVE=forge-$version-mdk.zip" >> $env:GITHUB_ENV
- name: Download and Initialize
run: |
$url = "https://files.minecraftforge.net/maven/net/minecraftforge/forge/${{ env.MDK_VERSION }}/${{ env.MDK_ARCHIVE }}"
echo "Downloading $url"
mkdir build
cd build
curl $url -o mdk.zip
Expand-Archive .\mdk.zip .
rm mdk.zip
cd ..
mkdir ~\.gradle
mv gradle.properties ~\.gradle\gradle.properties
- name: genIntellijRuns
run: |
cd build
.\gradlew.bat genIntellijRuns
- name: genEclipseRuns
run: |
cd build
.\gradlew.bat genEclipseRuns
- name: genVSCodeRuns
run: |
cd build
.\gradlew.bat genVSCodeRuns
- name: prepareRunClient
run: |
cd build
.\gradlew.bat prepareRunClient
- name: prepareRunServer
run: |
cd build
.\gradlew.bat prepareRunServer
- name: prepareRunData
run: |
cd build
.\gradlew.bat prepareRunData
- name: Package
run: |
mkdir ${{ env.MDK_NAME }}
mv .\build .\${{ env.MDK_NAME }}\${{ env.MDK_NAME }}
mv ~\.gradle .\${{ env.MDK_NAME }}\.gradle
Compress-Archive .\${{ env.MDK_NAME }} "${{ env.MDK_ARCHIVE }}"
- name: Upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ env.MDK_ARCHIVE }}
asset_name: ${{ env.MDK_ARCHIVE }}
asset_content_type: application/zip

3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
org.gradle.daemon=false
org.gradle.disable.cache.cleanup=true
org.gradle.cache.cleanup=false

0 comments on commit 31fa168

Please sign in to comment.