Skip to content

Release to Maven repository #3

Release to Maven repository

Release to Maven repository #3

Workflow file for this run

name: Release to Maven repository
on:
workflow_dispatch:
inputs:
repository:
description: 'Repository'
required: true
default: 'Snapshots'
type: choice
options:
- Snapshots
- Releases
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
jobs:
build:
name: Release
strategy:
fail-fast: false
matrix:
platform:
- name: macos-latest
pretty: macos
- name: ubuntu-22.04
pretty: linux
- name: windows-latest
pretty: windows
runs-on: ${{ matrix.platform.name }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Linux Cross Compilation
if: startsWith(matrix.platform.name, 'ubuntu')
run: |
echo Updating package list
sudo apt-get update
echo Installing i686 cross compilation packages
sudo apt-get install -y gcc-multilib g++-multilib
echo Installing aarch64 cross compilation packages
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
echo Installing arm cross compilation packages
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish with Gradle
run: ./gradlew publishNativesToDeftu${{ inputs.repository }}Repository -Pdeftu.publishing.username=${{ secrets.MAVEN_USER }} -Pdeftu.publishing.password=${{ secrets.MAVEN_PASS }}