Skip to content

Publish Rhino

Publish Rhino #2

Workflow file for this run

name: Publish Rhino
on:
workflow_dispatch:
inputs:
version:
required: true
description: The reference or tag
java:
required: true
description: The build java version
jobs:
publish:
name: Publish Anuken Rhino
runs-on: ubuntu-latest
steps:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ github.event.inputs.java }}
distribution: 'temurin'
- name: Checkout Anuken Rhino
uses: actions/checkout@v4
with:
repository: 'Anuken/rhino'
ref: ${{ github.event.inputs.version }}
path: rhino
- name: Install and Setup Minio CLI
run: |
curl https://dl.min.io/client/mc/release/linux-amd64/mc \
--create-dirs \
-o $HOME/minio-binaries/mc
chmod +x $HOME/minio-binaries/mc
export PATH=$PATH:$HOME/minio-binaries/
bash +o history
mc alias set xpdustry https://minio1.xpdustry.com $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
bash -o history
for object in $(mc ls -r xpdustry/maven-anuken-releases/ | grep -E 'maven-metadata-local\.xml$' | awk '{print $6}')
do
mkdir -p ~/.m2/repository/"$(dirname "$object")"
mc cp xpdustry/maven-anuken-releases/"$object" ~/.m2/repository/"$object"
done
env:
MINIO_ACCESS_KEY: "${{ secrets.MINIO_ACCESS_KEY }}"
MINIO_SECRET_KEY: "${{ secrets.MINIO_SECRET_KEY }}"
- name: Build and Install Rhino
env:
VERSION: ${{ github.event.inputs.version }}
run: |
cd ./rhino
sed -i "s/^version=.*/version=$VERSION/" ./gradle.properties
./gradlew -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2 -xtest -xjavadoc assemble publishToMavenLocal
- name: Upload Updated Artifacts to S3
run: |
curl https://dl.min.io/client/mc/release/linux-amd64/mc \
--create-dirs \
-o $HOME/minio-binaries/mc
chmod +x $HOME/minio-binaries/mc
export PATH=$PATH:$HOME/minio-binaries/
bash +o history
mc alias set xpdustry https://minio1.xpdustry.com $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
bash -o history
# Upload the updated artifacts to S3
mc cp -r ~/.m2/repository/* xpdustry/maven-anuken-releases/
env:
MINIO_ACCESS_KEY: "${{ secrets.MINIO_ACCESS_KEY }}"
MINIO_SECRET_KEY: "${{ secrets.MINIO_SECRET_KEY }}"