Skip to content

Release Documentation #2

Release Documentation

Release Documentation #2

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
patch:
description: Is patch? (Will only update tagged version.txt)
required: true
default: false
type: boolean
release:
description: Is release? (Will update master version.txt)
required: true
default: false
type: boolean
tag:
description: Release Version (For tagged version.txt)
required: true
type: string
snapshot-tag:
description: New Version (For master version.txt)
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail'
jobs:
tag-release:
permissions:
contents: write
runs-on: [ self-hosted ]
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Push Tag
id: commit-tag
if: ${{ inputs.release || inputs.patch }}
run: |
echo ${{ inputs.tag }} > version.txt
git commit -am "${{ inputs.tag }} released."
git tag -f ${{ inputs.tag }}
git push origin refs/tags/${{ inputs.tag }}
build-java:
permissions:
contents: write
packages: write
needs: tag-release
runs-on: [self-hosted]
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: update-version
if: ${{ inputs.release || inputs.patch }}
run: |
echo ${{ inputs.tag }} > version.txt
- 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: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Publish with Gradle
run: ./gradlew :aeron-agent:publish --no-daemon
env:
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }}
update-tags:
permissions:
contents: write
needs: build-java
runs-on: [ self-hosted ]
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: master
- name: Update master
if: ${{ inputs.release }}
run: |
echo ${{ inputs.snapshot-tag }} > version.txt
git commit -am "post ${{ inputs.tag }} release bump"
git push origin master