Skip to content

Release

Release #30

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
prerelease:
default: true
description: Is this a pre-release version?
required: true
type: boolean
no-build-cache:
description: Stop Gradle from using its build-cache for repeated builds
type: boolean
required: false
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK for running Gradle
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: 'us-west-2'
- name: Spotless
uses: gradle/actions/setup-gradle@v3
with:
# this is a common failure point, so we run it first
arguments: spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
cache-read-only: ${{ inputs.cache-read-only }}
- name: tests
uses: gradle/actions/setup-gradle@v3
with:
# exclude spotlessCheck to avoid running it twice
arguments: check -x spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
cache-read-only: ${{ inputs.cache-read-only }}
- name: Conventional Changelog Action
id: version
uses: TriPSs/conventional-changelog-action@v5
with:
release-count: '1'
skip-version-file: 'true'
skip-commit: 'true'
skip-git-pull: 'true'
git-push: 'true'
- name: Assemble
uses: gradle/actions/setup-gradle@v3
with:
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
arguments: -Pversion=${{ steps.version.outputs.version }} assemble -x javadoc ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
cache-read-only: ${{ inputs.cache-read-only }}
- name: Prepare jar for upload
run: |
cp agent/build/libs/agent-${{steps.version.outputs.version}}-all.jar lumigo-opentelemetry-${{steps.version.outputs.version}}.jar
- name: Release on GitHub
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.tag }}
files: |
lumigo-opentelemetry-${{steps.version.outputs.version}}.jar
body: |
${{ steps.version.outputs.clean_changelog }}
prerelease: ${{ inputs.prerelease }}
name: Version ${{ steps.version.outputs.version }}
generate_release_notes: false