Skip to content

fix: maxActivationInterval being evaluated for non-while-pressed actions #807

fix: maxActivationInterval being evaluated for non-while-pressed actions

fix: maxActivationInterval being evaluated for non-while-pressed actions #807

Workflow file for this run

on:
push:
branches:
- master
env:
JAVA_VERSION: 25.0.2+10
GRADLE_OPTS: -Dorg.gradle.daemon=false
jobs:
build:
strategy:
fail-fast: true
matrix:
os:
- windows-latest
- ubuntu-latest
- ubuntu-24.04-arm
runs-on: ${{ matrix.os }}
outputs:
tag_name: ${{ steps.release_variables.outputs.tag_name }}
steps:
- name: Setup Platform Variables
id: platform_variables
shell: bash
run: |
case ${{ matrix.os }} in
windows-latest)
echo jdk_os=windows >> "$GITHUB_OUTPUT"
echo jdk_arch=x64 >> "$GITHUB_OUTPUT"
echo jdk_archive_type=zip >> "$GITHUB_OUTPUT"
echo dist_os=windows >> "$GITHUB_OUTPUT"
echo dist_arch=x86-64 >> "$GITHUB_OUTPUT"
echo dist_archive_extension=zip >> "$GITHUB_OUTPUT"
;;
ubuntu-latest)
echo jdk_os=linux-glibc >> "$GITHUB_OUTPUT"
echo jdk_arch=x64 >> "$GITHUB_OUTPUT"
echo jdk_archive_type=tar.gz >> "$GITHUB_OUTPUT"
echo dist_os=linux >> "$GITHUB_OUTPUT"
echo dist_arch=x86-64 >> "$GITHUB_OUTPUT"
echo dist_archive_extension=tgz >> "$GITHUB_OUTPUT"
;;
ubuntu-24.04-arm)
echo jdk_os=linux-glibc >> "$GITHUB_OUTPUT"
echo jdk_arch=aarch64 >> "$GITHUB_OUTPUT"
echo jdk_archive_type=tar.gz >> "$GITHUB_OUTPUT"
echo dist_os=linux >> "$GITHUB_OUTPUT"
echo dist_arch=aarch64 >> "$GITHUB_OUTPUT"
echo dist_archive_extension=tgz >> "$GITHUB_OUTPUT"
;;
*)
exit 1
;;
esac
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Download Zulu (without CRaC)
id: download_zulu
shell: bash
run: |
cd $RUNNER_TEMP
jdk_archive_filename=$(curl -LOs -w '%{filename_effective}' "$(curl -s -X GET "https://api.azul.com/metadata/v1/zulu/packages/?java_version=$JAVA_VERSION&os=${{ steps.platform_variables.outputs.jdk_os }}&arch=${{ steps.platform_variables.outputs.jdk_arch }}&archive_type=${{ steps.platform_variables.outputs.jdk_archive_type }}&java_package_type=jdk&javafx_bundled=false&crac_supported=false&release_status=ga&availability_types=CA&certifications=tck" -H 'accept: application/json' | jq -r '.[0].download_url')")
echo "jdk_archive_filename=$jdk_archive_filename" >> "$GITHUB_OUTPUT"
- name: Install JDK
uses: actions/setup-java@v5
with:
distribution: jdkfile
jdkFile: ${{ runner.temp }}/${{ steps.download_zulu.outputs.jdk_archive_filename }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle Init Script
shell: bash
run: |
mkdir -p $HOME/.gradle
cat << 'EOF' > "$HOME/.gradle/init.gradle.kts"
allprojects {
val baseUrl = uri("https://maven.bwravencl.de")
val user = "github"
val pass = "${{ secrets.MAVEN_TOKEN_SECRET }}"
buildscript {
repositories {
maven {
url = baseUrl.resolve("releases")
credentials {
username = user
password = pass
}
mavenContent { releasesOnly() }
}
maven {
url = baseUrl.resolve("snapshots")
credentials {
username = user
password = pass
}
mavenContent { snapshotsOnly() }
}
}
}
repositories {
maven {
url = baseUrl.resolve("releases")
credentials {
username = user
password = pass
}
mavenContent { releasesOnly() }
}
maven {
url = baseUrl.resolve("snapshots")
credentials {
username = user
password = pass
}
mavenContent { snapshotsOnly() }
}
}
}
EOF
- name: Build ZIP
id: build_zip
if: runner.os == 'Windows'
run: ./gradlew distZip --info
- name: Build TGZ
id: build_tgz
if: runner.os == 'Linux'
run: ./gradlew distTar --info
- name: Upload Spotbugs-Reports Artifact
if: ${{ (steps.build_zip.outcome == 'failure') || (steps.build_tgz.outcome == 'failure') }}
uses: actions/upload-artifact@v6
with:
name: spotbugs-reports
path: build/reports/spotbugs
if-no-files-found: ignore
- name: Setup Release Variables
id: release_variables
shell: bash
run: |
archive_path=$(find build/distributions/ControllerBuddy-*.${{ steps.platform_variables.outputs.dist_archive_extension }} -maxdepth 1 -type f -print0)
echo "archive_path=$archive_path" >> "$GITHUB_OUTPUT"
echo "archive_filename=$(basename "$archive_path")" >> "$GITHUB_OUTPUT"
echo "tag_name=$(basename -s .${{ steps.platform_variables.outputs.dist_archive_extension }} "$archive_path" | sed "s/^ControllerBuddy-//;s/${{ steps.platform_variables.outputs.dist_os }}-${{ steps.platform_variables.outputs.dist_arch }}-//")" >> "$GITHUB_OUTPUT"
- name: Upload Archive Artifact
uses: actions/upload-artifact@v6
with:
name: ${{ steps.release_variables.outputs.archive_filename }}
path: ${{ steps.release_variables.outputs.archive_path }}
if-no-files-found: error
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
- name: Sign Archive
id: sign_archive
shell: bash
run: |
signature_path="${{ steps.release_variables.outputs.archive_path }}.sig"
gpg --local-user 8590BB74C0F559F8AC911C1D8058553A1FD36B23 --pinentry-mode loopback --passphrase ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} --detach-sig --output "$signature_path" --yes ${{ steps.release_variables.outputs.archive_path }}
echo "signature_path=$signature_path" >> "$GITHUB_OUTPUT"
echo "signature_filename=$(basename "$signature_path")" >> "$GITHUB_OUTPUT"
- name: Upload Signature Artifact
uses: actions/upload-artifact@v6
with:
name: ${{ steps.sign_archive.outputs.signature_filename }}
path: ${{ steps.sign_archive.outputs.signature_path }}
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v7
- name: Collect Artifact Files
id: collect_files
shell: bash
run: |
files=$(find . -iname 'ControllerBuddy-*' -mindepth 2 -maxdepth 2 -type f)
if [ -z "$files" ]
then
echo "Error: No artifact files found."
exit 1
fi
echo "files<<EOF" >> "$GITHUB_OUTPUT"
while IFS= read -r line
do
echo "$line" >> "$GITHUB_OUTPUT"
done <<< "$files"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Check Tag
uses: action-pack/tag-exists@v1
id: check_tag
with:
tag: ${{ needs.build.outputs.tag_name }}
- name: Tag Commit
if: steps.check_tag.outputs.exists == 'false'
uses: tvdias/github-tagger@v0.0.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.build.outputs.tag_name }}
- name: Release
uses: softprops/action-gh-release@v2
with:
name: ControllerBuddy-${{ needs.build.outputs.tag_name }}
tag_name: ${{ needs.build.outputs.tag_name }}
draft: false
prerelease: false
files: ${{ steps.collect_files.outputs.files }}