Skip to content

Release

Release #46

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
tags:
- "*.*.*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail'
aeronRepoPath: 'generic-local/'
jobs:
ci:
uses: ./.github/workflows/ci.yml
ci-low-cadence:
uses: ./.github/workflows/ci-low-cadence.yml
codeql:
uses: ./.github/workflows/codeql.yml
github-release:
name: Create Github Release
permissions:
contents: write
needs: [ ci, ci-low-cadence, codeql ]
runs-on: self-hosted
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- id: create-release
name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
release-java:
name: Release java artifacts
permissions:
contents: read
packages: write
needs: github-release
runs-on: [ self-hosted ]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
- name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION
run: |
java -Xinternalversion
echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV
echo "BUILD_JAVA_VERSION=8" >> $GITHUB_ENV
- name: Publish with Gradle
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ossrhUsername }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ossrhPassword }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.signingPassword }}
release-c:
name: Release c artifacts
permissions:
contents: write
id-token: write
packages: write
needs: github-release
runs-on: [ self-hosted ]
strategy:
fail-fast: false
matrix:
include:
- distro: ubuntu
version: 20.04
- distro: ubuntu
version: 22.04
- distro: debian
version: bullseye
- distro: debian
version: bookworm
- distro: rocky
version: 8.9
- distro: awslinux
version: 2023
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Artifacts Using Docker
uses: docker/build-push-action@v6
with:
context: .
file: ./cppbuild/${{ matrix.distro }}/Dockerfile
pull: true
shm-size: 1g
outputs: build
target: essentials-artifacts
build-args: VERSION=${{ matrix.version }}
- name: Rename artifact
run: |
artifact_name=aeron-$(cat version.txt)-${{ matrix.distro }}-${{ matrix.version }}-x86_64.tar.gz
echo "artifact_name=$artifact_name" >> $GITHUB_ENV
mv ./build/*.tar.gz ./build/$artifact_name
- name: Upload to Github Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.github-release.outputs.upload_url }}
asset_path: ./build/${{ env.artifact_name }}
asset_name: ${{ env.artifact_name }}
asset_content_type: application/gzip
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: 'http://localhost:8081'
with:
oidc-provider-name: 'github'
oidc-audience: 'github-workflows'
- name: Publish Build info With JFrog CLI
run: jf rt u *.tar.gz ${{ env.aeronRepoPath }}
working-directory: ./build