Skip to content

Commit

Permalink
build: Simplify GH workflow configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Feb 23, 2023
1 parent 48ef788 commit 575d929
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 80 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Build
on:
pull_request:

env:
JAVA_VERSION: '11'
JAVA_DISTRO: 'zulu'

jobs:
build:
name: Build
Expand All @@ -23,22 +19,9 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- name: Cache Gradle
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Cache Gradle wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlew-${{ hashFiles('**/gradlew') }}
restore-keys: ${{ runner.os }}-gradlew-
java-version: ${{ vars.JAVA_VERSION }}
distribution: ${{ vars.JAVA_DISTRO }}
cache: gradle

- name: Build
run: ./gradlew build -S
27 changes: 5 additions & 22 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
push:
branches: [ master ]

env:
JAVA_VERSION: '11'
JAVA_DISTRO: 'zulu'

jobs:
precheck:
name: Precheck
Expand Down Expand Up @@ -44,22 +40,9 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- name: Cache Gradle
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Cache Gradle wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlew-${{ hashFiles('**/gradlew') }}
restore-keys: ${{ runner.os }}-gradlew-
java-version: ${{ vars.JAVA_VERSION }}
distribution: ${{ vars.JAVA_DISTRO }}
cache: gradle

- name: Build
run: ./gradlew -Prelease=true build
Expand All @@ -68,7 +51,7 @@ jobs:
run: ./gradlew -Prelease=true :ikonli-browser:jlinkZip :ikonli-browser:jpackage

- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: artifacts
if-no-files-found: ignore
Expand All @@ -88,7 +71,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
42 changes: 6 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
description: 'Release version'
required: true

env:
JAVA_VERSION: '11'
JAVA_DISTRO: 'zulu'

jobs:
precheck:
name: Precheck
Expand Down Expand Up @@ -47,22 +43,9 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- name: Cache Gradle
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Cache Gradle wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlew-${{ hashFiles('**/gradlew') }}
restore-keys: ${{ runner.os }}-gradlew-
java-version: ${{ vars.JAVA_VERSION }}
distribution: ${{ vars.JAVA_DISTRO }}
cache: gradle

- name: Version
run: |
Expand Down Expand Up @@ -105,22 +88,9 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- name: Cache Gradle
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Cache Gradle wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlew-${{ hashFiles('**/gradlew') }}
restore-keys: ${{ runner.os }}-gradlew-
java-version: ${{ vars.JAVA_VERSION }}
distribution: ${{ vars.JAVA_DISTRO }}
cache: gradle

- name: Version
run: |
Expand Down
4 changes: 2 additions & 2 deletions jreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2015-2022 Andres Almiray.
# Copyright 2015-2023 Andres Almiray.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,7 +33,7 @@ project:
groupId: org.kordamp.ikonli
version: 11
inceptionYear: 2015
stereotype: cli
stereotype: CLI
snapshot:
label: '{{projectVersionNumber}}.EarlyAccess'

Expand Down

0 comments on commit 575d929

Please sign in to comment.