Skip to content

Commit

Permalink
Add an action to deploy to Github Packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame committed Aug 12, 2021
1 parent e293823 commit de2d4fa
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will build a package using Gradle and then publish it to GitHub
# packages when a release is created

name: Gradle Package

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'adopt'
server-id: github
settings-path: ${{ github.workspace }}

- name: Build with Gradle
run: ./gradlew build -x test

- name: Publish to GitHub Packages
run: ./gradlew publish -PmavenReleaseRepoUrl="https://maven.pkg.github.com/css4j/xml-dtd" -PmavenRepoUsername=${{ github.actor }} -PmavenRepoPassword=${{ secrets.GITHUB_TOKEN }}

0 comments on commit de2d4fa

Please sign in to comment.