File tree Expand file tree Collapse file tree 1 file changed +35
-7
lines changed
Expand file tree Collapse file tree 1 file changed +35
-7
lines changed Original file line number Diff line number Diff line change 8888 path : |
8989 java/target/classes/native
9090
91- add -centos7-jni-and-deploy :
91+ build -centos7 :
9292 runs-on : ubuntu-latest
9393 container :
9494 image : " kcllang/kcl-java-builder-centos7:0.1.0"
@@ -136,15 +136,43 @@ jobs:
136136 name : kcl-lib
137137 path : java/target/*.jar
138138
139+ deploy :
140+ runs-on : ubuntu-latest
141+
142+ permissions :
143+ contents : read
144+ packages : write
145+ needs : [ test-and-build, build-centos7 ]
146+ steps :
147+ - name : Checkout
148+ uses : actions/checkout@v3
149+
150+ - name : Set up JDK 8
151+ uses : actions/setup-java@v4
152+ with :
153+ distribution : ' temurin'
154+ java-version : ' 8'
155+ server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
156+ settings-path : ${{ github.workspace }} # location for the settings.xml file
157+
158+ - name : Download Jar
159+ uses : actions/download-artifact@v3
160+ with :
161+ name : kcl-lib
162+ path : java/release
163+
139164 - name : Release to Github Packages
140165 if : " startsWith(github.ref, 'refs/tags/')"
141166 working-directory : java
142167 run : |
143- mvn package deploy \
144- -DskipTests=true \
145- -DskipCompile=true \
146- -Dcargo-build.profile=release \
147- -DserverId=github \
168+ JAR_FILE=$(find ./release -name "*.jar")
169+ echo "Deploying $JAR_FILE"
170+ mvn deploy:deploy-file \
171+ -Dfile=$JAR_FILE \
172+ -DpomFile=./pom.xml \
173+ -DrepositoryId=github \
174+ -Durl=https://maven.pkg.github.com/kcl-lang/lib \
148175 -s $GITHUB_WORKSPACE/settings.xml
176+
149177 env :
150- GITHUB_TOKEN : ${{ github.token }}
178+ GITHUB_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments