2021-12-02 15:22:55 -07:00
|
|
|
# This workflow uses actions that are not certified by GitHub.
|
|
|
|
|
# They are provided by a third-party and are governed by
|
|
|
|
|
# separate terms of service, privacy policy, and support
|
|
|
|
|
# documentation.
|
2020-02-20 12:44:22 -05:00
|
|
|
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
|
2021-04-05 17:44:33 +03:00
|
|
|
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
|
2020-02-20 11:33:16 -05:00
|
|
|
|
|
|
|
|
name: Gradle Package
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
release:
|
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
2021-03-02 19:59:19 -06:00
|
|
|
permissions:
|
|
|
|
|
contents: read
|
|
|
|
|
packages: write
|
2020-02-20 11:33:16 -05:00
|
|
|
|
|
|
|
|
steps:
|
2022-03-28 13:10:48 -04:00
|
|
|
- uses: actions/checkout@v3
|
2021-03-02 18:43:44 +03:00
|
|
|
- name: Set up JDK 11
|
2022-03-28 13:10:48 -04:00
|
|
|
uses: actions/setup-java@v3
|
2020-02-20 11:33:16 -05:00
|
|
|
with:
|
2021-03-02 18:43:44 +03:00
|
|
|
java-version: '11'
|
2022-01-15 00:05:31 +01:00
|
|
|
distribution: 'temurin'
|
2020-02-20 11:33:16 -05:00
|
|
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
|
|
|
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
|
|
|
|
|
2020-02-20 12:54:19 -05:00
|
|
|
- name: Build with Gradle
|
2022-06-20 09:13:25 -06:00
|
|
|
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
2021-12-02 15:22:55 -07:00
|
|
|
with:
|
|
|
|
|
arguments: build
|
2020-02-20 11:33:16 -05:00
|
|
|
|
2020-03-15 03:47:21 -07:00
|
|
|
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
|
2020-02-21 12:55:06 -05:00
|
|
|
# the publishing section of your build.gradle
|
2020-02-20 12:54:19 -05:00
|
|
|
- name: Publish to GitHub Packages
|
2022-06-20 09:13:25 -06:00
|
|
|
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
2021-12-02 15:22:55 -07:00
|
|
|
with:
|
|
|
|
|
arguments: publish
|
2020-02-20 11:33:16 -05:00
|
|
|
env:
|
2020-02-20 12:54:19 -05:00
|
|
|
USERNAME: ${{ github.actor }}
|
2020-03-15 03:47:21 -07:00
|
|
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|