Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: first setup of mvn deploy with github action #93

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mvn-build-action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Java CI

on: [push]
on: [push, pull_request]

jobs:
build:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/mvn-deploy-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish package to the Maven Central Repository
on:
push:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Setup Maven Settings
run: cp .travis/travis-settings.xml $HOME/.m2/settings.xml
- name: Publish package
run: mvn deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSS_TESTRUNNER_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_TESTRUNNER_PASSWORD }}
4 changes: 2 additions & 2 deletions .travis/travis-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<servers>
<server>
<id>ossrh-test-runner-snapshots</id>
<username>${env.OSS_TESTRUNNER_USERNAME}</username>
<password>${env.OSS_TESTRUNNER_PASSWORD}</password>
<username>${secrets.OSS_TESTRUNNER_USERNAME}</username>
<password>${secrets.OSS_TESTRUNNER_PASSWORD}</password>
</server>
</servers>
</settings>