Skip to content

Commit

Permalink
Completely refactored again
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrix-Shen committed May 6, 2022
1 parent de4112d commit 24bdd7a
Show file tree
Hide file tree
Showing 260 changed files with 1,979 additions and 6,552 deletions.
50 changes: 31 additions & 19 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ jobs:
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
path: |
~/.gradle/caches
./.gradle/loom-caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties', '**/*.accesswidener') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Get short commit sha
id: get_short_sha
Expand Down Expand Up @@ -68,28 +71,33 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: ${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
path: build/libs/
path: fabricWrapper/build/libs/

- name: Create Github release
- name: Create Github Release
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "dev"
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: dev-${{ github.run_number}}
prerelease: true
title: "[CI#${{ github.run_number}}]${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}"
files: |
LICENSE
build/libs/*.jar
fabricWrapper/build/libs/*.jar
- name: Publish realease to curseforge
if: contains(github.event.head_commit.message, '[publish skip]') == false
- name: Update Github Release
uses: softprops/action-gh-release@v1
with:
tag_name: dev-${{ github.run_number}}
generate_release_notes: true

- name: Publish release to Curseforge
if: contains(github.event.head_commit.message, '[publish skip]') == false && contains(github.event.ref, 'refs/heads/exp') == false
uses: Kir-Antipov/[email protected]
with:
curseforge-id: 478757
curseforge-token: ${{ secrets.CF_API_TOKEN }}

files-primary: build/libs/!(*-@(dev|sources)).jar
files-secondary: build/libs/*-@(dev|sources).jar
files-primary: fabricWrapper/build/libs/!(*-@(dev|sources)).jar
files-secondary: ''

name: ''
version: ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
Expand Down Expand Up @@ -141,9 +149,13 @@ jobs:
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
path: |
~/.gradle/caches
./.gradle/loom-caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties', '**/*.accesswidener') }}
restore-keys: ${{ runner.os }}-gradle-


- name: Get short commit sha
id: get_short_sha
Expand Down Expand Up @@ -179,16 +191,16 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: ${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
path: build/libs/
path: fabricWrapper/build/libs/

- name: Publish realease to curseforge
uses: Kir-Antipov/[email protected]
with:
curseforge-id: 478757
curseforge-token: ${{ secrets.CF_API_TOKEN }}

files-primary: build/libs/!(*-@(dev|sources)).jar
files-secondary: build/libs/*-@(dev|sources).jar
files-primary: fabricWrapper/build/libs/!(*-@(dev|sources)).jar
files-secondary: ''

name: ''
version: ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.gradle/
build/
out/
publish/
classes/

# eclipse
Expand All @@ -24,6 +25,10 @@ bin/
.classpath
.project

# macos

*.DS_Store

# fabric

run/
run/
Loading

0 comments on commit 24bdd7a

Please sign in to comment.