Files

38 lines
1.1 KiB
YAML
Raw Permalink Normal View History

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
permissions:
contents: read
packages: write
2020-02-20 11:33:16 -05:00
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
2020-02-20 11:33:16 -05:00
with:
java-version: '11'
2021-03-11 12:56:09 +03:00
distribution: 'adopt'
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
run: gradle 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
run: gradle 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 }}