Skip to content

Commit 181a57b

Browse files
authored
Merge pull request #1 from HyperaOfficial/publish-release
Automatic Publishing
2 parents 003b3b9 + a4ec864 commit 181a57b

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/publish-release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Release
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Java
11+
uses: actions/setup-java@v2
12+
with:
13+
java-version: '8'
14+
distribution: 'adopt'
15+
server-id: hypera-releases
16+
server-username: MAVEN_USERNAME
17+
server-password: MAVEN_PASSWORD
18+
- name: Publish package
19+
run: mvn --batch-mode deploy
20+
env:
21+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
22+
MAVEN_PASSWORD: ${{ secrets.MAVEN_TOKEN }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Snapshot
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Java
11+
uses: actions/setup-java@v2
12+
with:
13+
java-version: '8'
14+
distribution: 'adopt'
15+
server-id: hypera-snapshots
16+
server-username: MAVEN_USERNAME
17+
server-password: MAVEN_PASSWORD
18+
- name: Publish package
19+
run: mvn --batch-mode deploy
20+
env:
21+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
22+
MAVEN_PASSWORD: ${{ secrets.MAVEN_TOKEN }}

0 commit comments

Comments
 (0)