Skip to content

Commit b266b3e

Browse files
committed
feat(1.0.1): 添加自动发布
1 parent 350361d commit b266b3e

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [ created ]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Maven Central Repository
11+
uses: actions/setup-java@v3
12+
with:
13+
java-version: '17'
14+
distribution: 'corretto'
15+
server-id: ossrh
16+
server-username: OSSRH_USERNAME
17+
server-password: OSSRH_TOKEN
18+
- name: Publish package
19+
run: mvn --batch-mode deploy
20+
env:
21+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
22+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>cn.zhangqin56</groupId>
88
<artifactId>zq-common</artifactId>
9-
<version>1.0.0</version>
9+
<version>1.0.1</version>
1010

1111
<name>zq-common</name>
1212

0 commit comments

Comments
 (0)