Skip to content

Commit

Permalink
main
Browse files Browse the repository at this point in the history
  • Loading branch information
mouse0w0 committed Jul 2, 2023
0 parents commit 4454977
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build
on:
release:
types: [published]
defaults:
run:
shell: pwsh
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Config
run: |
Write-Output "${{ github.event.release.body }}" >> $env:GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ env.java_version }}
- name: Initalize git repository
if: ${{ env.repo }}
run: |
New-Item -Type Directory ~\.gradle
Move-Item .\gradle.properties ~\.gradle\gradle.properties
New-Item -Type Directory ${{ env.archive_name }}
Set-Location ${{ env.archive_name }}
git clone -b ${{ env.branch }} ${{ env.repo }}
Get-ChildItem | Select-Object -ExpandProperty Name -First 1 | Set-Location
git checkout ${{ env.commit }}
Remove-Item .\.git -Recurse -Force
- name: Initalize zip
if: ${{ env.url }}
run: |
New-Item -Type Directory ~\.gradle
Move-Item .\gradle.properties ~\.gradle\gradle.properties
New-Item -Type Directory ${{ env.archive_name }}
Set-Location ${{ env.archive_name }}
curl ${{ env.url }} -o .\temp.zip
Expand-Archive .\temp.zip .\${{ env.archive_name }}
Remove-Item .\temp.zip
- name: Run Gradle Task
run: |
Set-Location ${{ env.archive_name }}
Get-ChildItem | Select-Object -ExpandProperty Name -First 1 | Set-Location
.\gradlew ${{ env.task }}
- name: Package
run: |
Move-Item ~\.gradle .\${{ env.archive_name }}\.gradle
Compress-Archive .\${{ env.archive_name }} ${{ env.archive_name }}.zip
- 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.archive_name }}.zip
asset_name: ${{ env.archive_name }}.zip
asset_content_type: application/zip

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# forge-mdk-offline

### 加速站点
- [加速站点1](https://tool.mintimate.cn/gh/)
- [加速站点2](https://ghproxy.com/)
- [加速站点3](https://github.91chi.fun/)
- [加速站点4](https://github.abskoop.workers.dev/)

### 使用说明[1.12.2-14.23.5.2847以上版本]
1. 下载后打开压缩包,将会看到两个文件夹,分别为`.gradle``forge-x.x.x-x.x.x.xxxx-xxx`
2.`.gradle`文件夹解压至`C:\Users\<当前用户>`(例如`C:\Users\administrator`)文件夹下,如果该目录已存在该文件夹,则覆盖。
3.`forge-x.x.x-x.x.x.xxxx-xxx`文件夹解压至任意全英文(路径名称不得有中文等非ASCII字符)路径下。
4. 按照所使用的 IDE`在 forge-x.x.x-x.x.x.xxxx-xxx 文件夹下打开命令提示符,运行指令:
1. IntelliJ IDEA:`gradlew genIntelliJRuns`
2. Eclipse:`gradlew eclipse genEclipseRuns`
3. VSCode:`gradlew genVSCodeRuns`
3. 直接在IDE中以**Gradle项目**打开或导入`forge-x.x.x-x.x.x.xxxx-xxx`文件夹。
6. 按照相关Forge教程进行后续操作即可。

### 使用说明[1.12.2-14.23.5.2847及以下版本]
1. 下载后打开压缩包,将会看到两个文件夹,分别为`.gradle``forge-x.x.x-x.x.x.xxxx-xxx`
2.`.gradle`文件夹解压至`C:\Users\<当前用户>`(例如`C:\Users\administrator`)文件夹下,如果该目录已存在该文件夹,则覆盖。
3.`forge-x.x.x-x.x.x.xxxx-xxx`文件夹解压至任意全英文(路径名称不得有中文等非ASCII字符)路径下。
4. 在解压后的`forge-x.x.x-x.x.x.xxxx-xxx`文件夹下打开cmd(命令提示符),运行指令:`gradlew setupDecompWorkspace`
5. 按照相关Forge教程进行后续操作即可。
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 4454977

Please sign in to comment.