Skip to content

Commit de2d4fa

Browse files
committed
Add an action to deploy to Github Packages.
1 parent e293823 commit de2d4fa

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/gradle-publish.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will build a package using Gradle and then publish it to GitHub
2+
# packages when a release is created
3+
4+
name: Gradle Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up JDK 16
21+
uses: actions/setup-java@v2
22+
with:
23+
java-version: '16'
24+
distribution: 'adopt'
25+
server-id: github
26+
settings-path: ${{ github.workspace }}
27+
28+
- name: Build with Gradle
29+
run: ./gradlew build -x test
30+
31+
- name: Publish to GitHub Packages
32+
run: ./gradlew publish -PmavenReleaseRepoUrl="https://maven.pkg.github.com/css4j/xml-dtd" -PmavenRepoUsername=${{ github.actor }} -PmavenRepoPassword=${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)