Skip to content

Update to the latest version of pixelduke:fxthemes #11

Update to the latest version of pixelduke:fxthemes

Update to the latest version of pixelduke:fxthemes #11

Workflow file for this run

name: Publish to maven central
on:
pull_request:
paths:
- .github\workflows\publish.yml
push:
paths:
- .github\workflows\publish.yml
tags:
- '*'
schedule:
# run on each Monday
- cron: '2 3 * * 1'
workflow_dispatch:
permissions:
actions: write
contents: read
pull-requests: write
env:
GRADLE_OPTS: -Xmx4g -Dorg.gradle.vfs.watch=false
JAVA_OPTS: -Xmx4g
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}-${{ github.event_name }}"
cancel-in-progress: true
jobs:
publish:
name: jablib
runs-on: ubuntu-22.04
steps:
- name: Fetch all history for all tags and branches
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
show-progress: 'false'
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '24'
distribution: 'corretto'
java-package: 'jdk'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Generate JBang cache key
id: cache-key
shell: bash
run: |
echo "cache_key=jbang-$(date +%F)" >> $GITHUB_OUTPUT
- name: Use cache
uses: actions/cache@v4
with:
lookup-only: true
path: ~/.jbang
key: ${{ steps.cache-key.outputs.cache_key }}
restore-keys:
jbang-
- name: Setup JBang
uses: jbangdev/setup-jbang@main
# region Publish JabLib on Maven Central
- id: istagbuild
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
echo "tagbuild=true" >> "$GITHUB_OUTPUT"
else
echo "tagbuild=false" >> "$GITHUB_OUTPUT"
fi
- name: Decode secretKeyRingFile
id: secring
uses: timheuer/base64-to-file@v1
with:
fileName: 'secring.gpg'
encodedString: ${{ secrets.KOPPOR_SIGNING_SECRETKEYRINGFILE_BASE64 }}
- name: store secrets
run: |
cat >> gradle.properties <<EOF
signing.keyId=${{ secrets.KOPPOR_SIGNING_KEYID }}
signing.password=${{ secrets.KOPPOR_SIGNING_PASSWORD }}
signing.secretKeyRingFile=${{ steps.secring.outputs.filePath }}
mavenCentralUsername=${{ secrets.KOPPOR_MAVENCENTRALUSERNAME }}
mavenCentralPassword=${{ secrets.KOPPOR_MAVENCENTRALPASSWORD }}
EOF
grep secretKeyRingFile gradle.properties
file ${{ steps.secring.outputs.filePath }}
md5sum ${{ steps.secring.outputs.filePath }}
- name: publishAllPublicationsToMavenCentralRepository
run: ./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" -Ptagbuild="${{ steps.istagbuild.outputs.tagbuild }}" :jablib:publishAllPublicationsToMavenCentralRepository
# endregion