From cfa28fed2a37fa4de3ee60386ee159dc17455ecf Mon Sep 17 00:00:00 2001 From: CXwudi <1113421658@qq.com> Date: Wed, 6 May 2020 21:44:42 -0700 Subject: [PATCH] Create mavenpublish.yml --- .github/workflows/mavenpublish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/mavenpublish.yml diff --git a/.github/workflows/mavenpublish.yml b/.github/workflows/mavenpublish.yml new file mode 100644 index 0000000..e7e87b1 --- /dev/null +++ b/.github/workflows/mavenpublish.yml @@ -0,0 +1,30 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path + +name: Tested Maven Packaging on Github + +on: + release: + types: [created] + +jobs: + build: + name: build and deploy to github + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 1.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: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }}