Publish to GitHub Packages #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to GitHub Packages | |
on: | |
# Publishes packages on release (the Rhino version should not be | |
# changed to '-SNAPSHOT' before creating the release in Github). | |
release: | |
types: [published] | |
# Allows to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: read-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- name: Set up JDK | |
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
server-id: github | |
settings-path: ${{ github.workspace }} | |
- name: Publish | |
env: | |
ORG_GRADLE_PROJECT_mavenUser: ${{ github.actor }} | |
ORG_GRADLE_PROJECT_mavenPassword: ${{ secrets.GITHUB_TOKEN }} | |
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} | |
ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} | |
run: >- | |
./gradlew publish | |
-PmavenReleaseRepo="https://maven.pkg.github.com/mozilla/rhino" | |
-PmavenSnapshotRepo="https://maven.pkg.github.com/mozilla/rhino" |