-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade dependencies & automatic release (#280)
- Loading branch information
1 parent
ce69d09
commit b43f1ac
Showing
24 changed files
with
231 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Dependency Submission | ||
|
||
on: | ||
# Only runs on main branch | ||
push: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: write # Required for dependency submission | ||
|
||
jobs: | ||
dependency-submission: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 21 | ||
- name: Generate and submit dependency graph | ||
uses: gradle/actions/dependency-submission@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
base_dir="$( cd "$(dirname "$0")/../.." >/dev/null 2>&1 ; pwd -P )" | ||
readonly base_dir | ||
|
||
cd "$base_dir" | ||
echo "Reading project version from Gradle project at ${base_dir}..." | ||
project_version=$(./gradlew properties --console=plain --quiet | grep "^version:" | awk '{print $2}') | ||
readonly project_version | ||
echo "Read project version '$project_version' from Gradle project" | ||
|
||
release_artifacts=$(find build/release-artifacts -type f) | ||
readonly release_artifacts | ||
readonly title="Release $project_version" | ||
readonly tag="$project_version" | ||
echo "Creating release:" | ||
echo "Git tag : $tag" | ||
echo "Title : $title" | ||
echo "Artifacts: $release_artifacts" | ||
|
||
# shellcheck disable=SC2086 | ||
release_url=$(gh release create --draft --latest --title "$title" --target main "$tag" $release_artifacts) | ||
readonly release_url | ||
echo "Release URL: $release_url" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
skip-maven-central: | ||
description: "Skip deployment to Maven Central" | ||
required: true | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
|
||
build-native-packages: | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-latest', 'windows-latest'] | ||
env: | ||
DEFAULT_OS: 'ubuntu-latest' | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
contents: read | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
- name: Build | ||
run: ./gradlew build jpackage --info --warning-mode all -PskipFlakyTests=true | ||
|
||
- name: Archive executable JAR | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ env.DEFAULT_OS == matrix.os }} | ||
with: | ||
name: executable-jar | ||
retention-days: 5 | ||
if-no-files-found: error | ||
path: | | ||
jfxui/build/libs/white-rabbit-fx-*.jar | ||
jfxui/build/libs-checksums/* | ||
- name: Archive native package for ${{ runner.os }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: native-package-${{ runner.os }} | ||
retention-days: 5 | ||
if-no-files-found: error | ||
path: | | ||
jfxui/build/jpackage-dist/* | ||
jfxui/build/jpackage-checksums/* | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build-native-packages | ||
defaults: | ||
run: | ||
shell: "bash" | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: false | ||
permissions: | ||
contents: write # Required for creating GitHub release | ||
actions: read # Required for checking build status | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
# - name: Fail if not running on main branch | ||
# if: ${{ github.ref != 'refs/heads/main' }} | ||
# uses: actions/github-script@v7 | ||
# with: | ||
# script: | | ||
# core.setFailed('Not running on main branch, github.ref is ${{ github.ref }}. Please start this workflow only on main') | ||
|
||
# - name: Publish to Central Repository | ||
# if: ${{ ! inputs.skip-maven-central }} | ||
# run: ./gradlew publish closeAndReleaseRepository --info --warning-mode all | ||
# env: | ||
# ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} | ||
# ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} | ||
# ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | ||
# ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: build/release-artifacts | ||
|
||
- name: List artifacts | ||
run: | | ||
find build/release-artifacts -type f | ||
ls -lh build/release-artifacts | ||
- name: Create GitHub Release | ||
run: ./.github/workflows/github_release.sh | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.