aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-22 22:21:01 +0900
committerGitHub <noreply@github.com>2022-07-22 22:21:01 +0900
commit04da3001161a1389b3878c60cc52e66042eec2fd (patch)
tree77d9b62647feb1ab50d36572735794d411b04ff6
parentead404e7e2c54a36f0dddbf87ab26a5342851f0f (diff)
downloadOneConfig-04da3001161a1389b3878c60cc52e66042eec2fd.tar.gz
OneConfig-04da3001161a1389b3878c60cc52e66042eec2fd.tar.bz2
OneConfig-04da3001161a1389b3878c60cc52e66042eec2fd.zip
new: various workflow optimizations (#62)
* new: cache gradle files in workflows * fix: remove setup-java caching and cache prebundled-jars in release workflow * use secret for easier updating later Co-authored-by: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>
-rw-r--r--.github/workflows/build.yml12
-rw-r--r--.github/workflows/release.yml16
2 files changed, 24 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 62816b1..e773d76 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -30,7 +30,17 @@ jobs:
with:
java-version: 17
distribution: temurin
- cache: gradle
+
+ - uses: actions/cache@v2
+ with:
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+ **/loom-cache
+ **/prebundled-jars
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-
- name: Chmod Gradle
run: chmod +x ./gradlew
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e2c7bb7..2f79a05 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,13 +29,23 @@ jobs:
with:
java-version: 17
distribution: temurin
- cache: gradle
+
+ - uses: actions/cache@v2
+ with:
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+ **/loom-cache
+ **/prebundled-jars
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-
- name: Chmod Gradle
run: chmod +x ./gradlew
- name: Get version number
- run: echo '::set-output name=VERSION_NUMBER::$((47 + ${{ github.run_number }}))'
+ run: echo '::set-output name=VERSION_NUMBER::$(( ${{ secrets.BUILD_OFFSET }} + ${{ github.run_number }}))'
id: version
- name: Publish
@@ -45,4 +55,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: oneconfig-artifacts
- path: versions/**/build/libs/ \ No newline at end of file
+ path: versions/**/build/libs/