Skip to content

Commit 9f006c5

Browse files
committed
feat: update publish workflow to use ARM64 runner and streamline JAR handling
1 parent fac3c8c commit 9f006c5

File tree

1 file changed

+9
-45
lines changed

1 file changed

+9
-45
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414

1515
jobs:
1616
build:
17-
runs-on: ubuntu-latest
17+
runs-on: namespace-profile-arm64-large
1818
environment: production
1919
steps:
2020
- name: Checkout Repository
@@ -28,64 +28,28 @@ jobs:
2828
distribution: 'graalvm'
2929
java-version: '21'
3030

31-
- name: Restore Gradle Cache
32-
uses: actions/cache@v4
33-
with:
34-
path: |
35-
~/.gradle/caches
36-
~/.gradle/wrapper
37-
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
38-
restore-keys: |
39-
gradle-${{ runner.os }}-
40-
4131
- name: Build all modules with Gradle
42-
run: ./gradlew build shadowJar --parallel --build-cache
32+
run: ./gradlew build shadowJar --parallel
4333

44-
- name: Find all JAR files
45-
id: find_jars
46-
run: |
47-
echo "JAR_FILES=$(find . -path "*/build/libs/*.jar" | tr '\n' ' ')" >> $GITHUB_ENV
48-
49-
- name: Upload built JARs
50-
uses: actions/upload-artifact@v4
51-
with:
52-
name: built-jars
53-
path: "**/build/libs/*.jar"
54-
publish:
55-
needs: build
56-
runs-on: ubuntu-latest
57-
steps:
58-
- name: Download built JARs
59-
uses: actions/download-artifact@v4
60-
with:
61-
name: built-jars
62-
path: jars
63-
6434
- name: Publish all modules to Maven
6535
run: ./gradlew publish
66-
67-
release:
68-
needs: publish
69-
runs-on: ubuntu-latest
70-
steps:
71-
- name: Download built JARs
72-
uses: actions/download-artifact@v4
73-
with:
74-
name: built-jars
75-
path: jars
7636

7737
- name: Extract Project Version
7838
id: get_version
7939
run: echo "VERSION=$(./gradlew properties | grep "^version:" | awk '{print $2}')" >> $GITHUB_ENV
8040

41+
- name: Find all JAR files
42+
id: find_jars
43+
run: |
44+
echo "JAR_FILES=$(find . -path "*/build/libs/*.jar" | tr '\n' ' ')" >> $GITHUB_ENV
45+
8146
- name: Create GitHub Release
8247
uses: softprops/action-gh-release@v2
8348
with:
8449
tag_name: v${{ env.VERSION }}
8550
name: Release ${{ env.VERSION }}
8651
draft: false
8752
prerelease: false
88-
files: jars/*.jar
53+
files: ${{ env.JAR_FILES }}
8954
env:
90-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91-
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)