From 325e76073bc0222bf19dedea8bcd70c5495426da Mon Sep 17 00:00:00 2001 From: Konrad Pabjan Date: Thu, 20 Feb 2020 11:33:16 -0500 Subject: [PATCH] Add new starter workflows --- ci/gradle-publish.yml | 30 ++++++++++++++++++++ ci/maven-publish.yml | 30 ++++++++++++++++++++ ci/properties/gradle-publish.properties.json | 6 ++++ ci/properties/maven-publish.properties.json | 6 ++++ 4 files changed, 72 insertions(+) create mode 100644 ci/gradle-publish.yml create mode 100644 ci/maven-publish.yml create mode 100644 ci/properties/gradle-publish.properties.json create mode 100644 ci/properties/maven-publish.properties.json diff --git a/ci/gradle-publish.yml b/ci/gradle-publish.yml new file mode 100644 index 0000000..53aa48c --- /dev/null +++ b/ci/gradle-publish.yml @@ -0,0 +1,30 @@ +# This workflow will build a package using gradle and then publish it to GitHub packages whenever a release is created +# For more information see: https://github.com/actions/setup-java#publishing-using-gradle + +name: Gradle Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + 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 }} \ No newline at end of file diff --git a/ci/maven-publish.yml b/ci/maven-publish.yml new file mode 100644 index 0000000..64b1ae0 --- /dev/null +++ b/ci/maven-publish.yml @@ -0,0 +1,30 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages whenever a release is created +# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + 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 }} \ No newline at end of file diff --git a/ci/properties/gradle-publish.properties.json b/ci/properties/gradle-publish.properties.json new file mode 100644 index 0000000..eae856b --- /dev/null +++ b/ci/properties/gradle-publish.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Publish Java Package with Gradle", + "description": "Build a Java Package using Gradle and publish it to GitHub Packages.", + "iconName": "gradle", + "categories": ["Java", "Gradle"] +} \ No newline at end of file diff --git a/ci/properties/maven-publish.properties.json b/ci/properties/maven-publish.properties.json new file mode 100644 index 0000000..a13852e --- /dev/null +++ b/ci/properties/maven-publish.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Publish Java Package with Maven", + "description": "Build a Java Package using Maven and publish it to GitHub Packages.", + "iconName": "maven", + "categories": ["Java", "Maven"] +} \ No newline at end of file