Release 7.0.0-(cdp-version) #173
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "New semver version without cdp suffix" | |
required: true | |
run-name: "Release ${{ inputs.version }}-(cdp-version)" | |
jobs: | |
release: | |
runs-on: macos-13 # to force intel arch (macos-14+ use ARM which doesn't support virtualization) | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
# Docker is not installed on GitHub's MacOS hosted workers due to licensing issues | |
- name: Setup docker (missing on MacOS) | |
if: runner.os == 'macos' | |
# colima is not installed in macos-13, so we need this action since macos-12 is deprecated | |
uses: douglascamata/setup-docker-macos-action@v1-alpha | |
# For testcontainers to find the Colima socket | |
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running | |
- name: Map docker.sock to colima (macOS only) | |
if: runner.os == 'macos' | |
run: | | |
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock | |
- name: Cache Kotlin/Native binaries | |
uses: actions/cache@v4 | |
with: | |
path: ~/.konan | |
key: konan-${{ runner.os }} | |
- name: Compute full version (with protocol version) | |
run: echo "fullVersion=${{ inputs.version }}-$(cat protocol-definition/version.txt)" >> $GITHUB_OUTPUT | |
id: compute-version | |
- name: Release | |
uses: joffrey-bion/gradle-library-release-action@v2 | |
with: | |
version: ${{ steps.compute-version.outputs.fullVersion }} | |
gpg-signing-key: ${{ secrets.GPG_SECRET_ASCII_ARMORED }} | |
gpg-signing-password: ${{ secrets.GPG_PASSWORD }} | |
sonatype-username: ${{ secrets.OSSRH_TOKEN_USERNAME }} | |
sonatype-password: ${{ secrets.OSSRH_TOKEN_PASSWORD }} | |
gradle-publish-tasks: publishToSonatype closeAndReleaseSonatypeStagingRepository |