Skip to content

Commit 075dda4

Browse files
authored
Update release_and_push.yml
1 parent 8f941c4 commit 075dda4

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

.github/workflows/release_and_push.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,50 @@ name: Release and push to Maven Central
22

33
on:
44
push:
5+
branches:
6+
- main
57
tags:
68
- '*'
7-
workflow_dispatch:
89

9-
jobs:
10+
permissions:
11+
contents: write
1012

13+
jobs:
1114
publish:
12-
1315
runs-on: ubuntu-latest
14-
1516
permissions:
1617
contents: read
1718
packages: write
1819

1920
steps:
2021
- uses: actions/checkout@v3
2122

22-
- name: Set up Java
23+
- name: Set up Java for publishing to Maven Central Repository
2324
uses: actions/setup-java@v3
2425
with:
2526
java-version: '17'
26-
distribution: 'temurin'
27+
distribution: 'adopt'
2728
server-id: ossrh
2829
server-username: MAVEN_USERNAME
2930
server-password: MAVEN_PASSWORD
3031
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
3132
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3233

33-
- name: Build artifact
34-
run: mvn clean package -DskipTests
34+
- name: build artifact
35+
run: mvn clean package
3536

36-
- name: Create release
37-
uses: ncipollo/[email protected]
38-
with:
39-
allowUpdates: true
40-
artifacts: "${{ github.workspace }}/target/*.jar"
41-
token: ${{ secrets.GITHUB_TOKEN }}
42-
tag: 0.3.5
37+
# - name: Create Release
38+
# uses: ncipollo/[email protected]
39+
# with:
40+
# allowUpdates: true
41+
# artifacts: ${{ github.workspace }}/target/*.jar
42+
# token: ${{ secrets.GITHUB_TOKEN }}
43+
# tag: "v0.3.4"
4344

4445
- name: Publish to the Maven Central Repository
4546
run: mvn --no-transfer-progress deploy
4647

48+
4749
env:
4850
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
4951
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

0 commit comments

Comments
 (0)