Skip to content

Build Cassandra-Stress #5

Build Cassandra-Stress

Build Cassandra-Stress #5

Workflow file for this run

name: "Build Cassandra-Stress"
permissions:
contents: write
on:
workflow_dispatch:
inputs:
version:
required: true
description: 'Version of the release'
latest:
required: false
description: 'Build latest version'
workflow_call:
inputs:
version:
required: false
description: 'Version of the release'
type: string
latest:
required: false
default: false
type: boolean
description: 'Build latest version'
jobs:
build:
strategy:
matrix:
java: [ '11' ]
os: [ 'ubuntu-24.04' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
- name: Setup Ant
uses: cedx/setup-ant@v2
with:
optional-tasks: true
version: latest
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get install -y rpm dpkg-dev devscripts debhelper dh-make build-essential
- name: Build with version ${{ inputs.version }}
if: ${{ inputs.version != '' }}
run: ant -Dversion=${{ inputs.version }} -Drelease=true jar
- name: Build latest
if: ${{ inputs.version == '' }}
run: |
ant init
ant jar
- name: Artifacts
if: ${{ inputs.version != '' }}
run: |
ant -Dversion=${{ inputs.version }} -Drelease=true artifacts
./scripts/build_deb.sh --version ${{ inputs.version }}
./scripts/build_rpm.sh --version ${{ inputs.version }}
- name: Release
uses: softprops/action-gh-release@v2
id: release
if: ${{ inputs.version != '' }}
with:
make_latest: ${{ inputs.latest }}
name: "v${{ inputs.version }}"
tag_name: "v${{ inputs.version }}"
generate_release_notes: true
append_body: true
prerelease: false
fail_on_unmatched_files: true
files: |
build/cassandra-stress-bin.tar.gz
build/cassandra-stress-bin.tar.gz.sha256
build/cassandra-stress-bin.tar.gz.sha512
build/cassandra-stress-src.tar.gz
build/cassandra-stress-src.tar.gz.sha256
build/cassandra-stress-src.tar.gz.sha512
build/cassandra-stress_${{ inputs.version }}_all.deb
build/redhat/RPMS/noarch/cassandra-stress-${{ inputs.version }}-1.noarch.rpm
- name: "Generate release changelog"
if: ${{ inputs.version != '' }}
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
author: true
releaseUrl: ${{ steps.release.outputs.url }}
issues: false
pullRequests: true
- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ inputs.version != '' }}
with:
commit_message: "Update CHANGELOG.md"
branch: master
commit_options: '--no-verify --signoff'
file_pattern: CHANGELOG.md