Skip to content

Commit 24d0b85

Browse files
authored
Update maven.yml
1 parent 3f4264a commit 24d0b85

1 file changed

Lines changed: 21 additions & 8 deletions

File tree

.github/workflows/maven.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
with:
2424
java-version: '11'
2525

26-
- name: replace group id
27-
if: success()
28-
run: find . -name "pom.xml" | xargs sed -i "s/<groupId>com.cloudimpl<\/groupId>/<groupId>com.github.cloudimpl<\/groupId>/g"
26+
# - name: replace group id
27+
# if: success()
28+
# run: find . -name "pom.xml" | xargs sed -i "s/<groupId>com.cloudimpl<\/groupId>/<groupId>com.github.cloudimpl<\/groupId>/g"
2929

3030
- name: Extract ERRCODE_VERSION
3131
if: success()
@@ -37,17 +37,30 @@ jobs:
3737
if: success()
3838
run: mvn versions:set versions:commit -DnewVersion="${ERRCODE_VERSION}"
3939

40-
- name: Build with Maven
41-
run: |
42-
mvn -B package --file pom.xml
43-
mvn clean install
40+
# - name: Build with Maven
41+
# run: |
42+
# mvn -B package --file pom.xml
43+
# mvn clean install
4444
# - name: Publish to GitHub Packages Apache Maven
4545
# env:
4646
# GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
4747
# run: |
4848
# echo "<settings><servers><server><id>github</id><username>nuwansa</username><password>${GITHUB_TOKEN}</password></server></servers></settings>" > ~/.m2/settings.xml
4949
# mvn deploy
50-
50+
- name: Set up Maven Central Repository
51+
if: success()
52+
uses: actions/setup-java@v1
53+
with:
54+
java-version: 1.11
55+
server-id: ossrh
56+
server-username: MAVEN_USERNAME
57+
server-password: MAVEN_PASSWORD
58+
- name: Publish package
59+
run: mvn -B deploy
60+
env:
61+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
62+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
63+
5164
- name: Create Release
5265
if: success() && github.event_name == 'push'
5366
id: create_release

0 commit comments

Comments
 (0)