Skip to content

Commit

Permalink
Update mavenpublish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lm2343635 authored Mar 13, 2020
1 parent 1de376f commit eb5b8f7
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/mavenpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ on:
types: [created]

jobs:
build:

release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: setup-java
uses: actions/setup-java@v1
with:
java-version: 11

- name: setup-maven-settings
uses: s4u/maven-settings-action@v1
with:
servers: '[{"id": "github", "username": "x-access-token", "password": "${GITHUB_TOKEN}"}]'

- name: Build with Maven
run: mvn -B package --file pom.xml
- name: checkout
uses: actions/checkout@v1

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
- name: deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn deploy

0 comments on commit eb5b8f7

Please sign in to comment.