Skip to content

Commit

Permalink
added github package workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Nov 21, 2023
1 parent 2b0d13b commit 3a36355
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Gradle Package

on:
release:
types: [created]

jobs:
build:

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

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setting up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
env:
CI: true
with:
arguments: genSources build

- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@v2
with:
arguments: publish
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,15 @@ publishing {
from components.java
}
}

repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/CCBlueX/mcef"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

0 comments on commit 3a36355

Please sign in to comment.