Skip to content

Merge branch 'dev'

Merge branch 'dev' #7

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Kommand Publish
on:
push:
tags:
- "*"
workflow_dispatch:
permissions:
contents: read
jobs:
publish:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Set up Cargo
uses: actions-rust-lang/[email protected]
with:
toolchain: 1.69.0
target: ${{ matrix.cargo_target }}
- name: Set up just
run: cargo install just --version 1.15.0
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'microsoft'
architecture: ${{ matrix.jdk_arch }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Set up cross-compiler
run: just prepare
- name: Build kommand-core
run: just all
working-directory: kommand-core
- name: Import GPG key
run: |
mkdir -p $HOME/.gradle
echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode > $HOME/.gradle/secret.gpg
just importKey
- name: Publish to sonatype
run: |
just ciPublish \
${{ secrets.SONATYPE_USERNAME }} \
${{ secrets.SONATYPE_PASSWORD }} \
${{ secrets.GPG_KEY_ID }} \
${{ secrets.GPG_PASSPHRASE }}
- name: Clean up GPG key
if: always()
run: |
rm -f $HOME/.gradle/secret.gpg
just deleteKey ${{ secrets.GPG_KEY_ID }}