Skip to content

publish-to-github-packages #81

publish-to-github-packages

publish-to-github-packages #81

Workflow file for this run

# SPDX-FileCopyrightText: Copyright © 2024 - 2025 Caleb Cushing
#
# SPDX-License-Identifier: CC0-1.0
name: publish-to-github-packages
on:
workflow_run:
workflows: [build]
types: [completed]
branches: ["**"]
tags: [v*]
jobs:
publish:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
packages: write
env:
IS_PUBLISHING: 1
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch}}
filter: "blob:none"
fetch-depth: 0
- run: git remote set-head --auto origin
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
- run: ./gradlew publishAllPublicationsToGhRepository --build-cache --scan
env:
ORG_GRADLE_PROJECT_ghUsername: ${{ secrets.GITHUB_ACTOR }}
ORG_GRADLE_PROJECT_ghPassword: ${{ secrets.GITHUB_TOKEN }}