Skip to content

Commit

Permalink
[chore] Update build settings
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Jun 2, 2021
1 parent 33fd795 commit e81ec06
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 93 deletions.
85 changes: 5 additions & 80 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2015-2021 Andres Almiray
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Build

on:
push:
branches: [ master ]
pull_request:

jobs:
build:
Expand All @@ -30,9 +11,10 @@ jobs:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
if: startsWith(github.event.head_commit.message, 'Releasing version') != true

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v2
Expand All @@ -55,61 +37,4 @@ jobs:
${{ runner.os }}-gradlew-
- name: Build
run: ./gradlew -Prelease=true build -S

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
apps/ikonli-browser/build/distributions/ikonli-browser-*.zip
apps/ikonli-browser/build/ikonli-browser-standalone-*.zip
earlyaccess:
name: Early Access
needs: build
if: github.repository == 'kordamp/ikonli' && startsWith(github.event.head_commit.message, 'Releasing version') != true
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download build artifacts
uses: actions/download-artifact@v2

- name: Display build artifacts
run: ls -R artifact

- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- name: Version
id: vars
run: echo ::set-output name=version::$(cat VERSION)

- name: Release
uses: jreleaser/release-action@v1
with:
version: early-access
env:
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}

- name: JReleaser output
if: always()
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
out/jreleaser/release/CHANGELOG.md
run: ./gradlew build -S
104 changes: 104 additions & 0 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: EarlyAccess

on:
push:
branches: [ master ]

jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
if: github.repository == 'kordamp/ikonli' && startsWith(github.event.head_commit.message, 'Releasing version') != true

steps:
- uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- name: Build
run: ./gradlew -Prelease=true build -S

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
apps/ikonli-browser/build/distributions/ikonli-browser-*.zip
apps/ikonli-browser/build/ikonli-browser-standalone-*.zip
earlyaccess:
name: EarlyAccess
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download build artifacts
uses: actions/download-artifact@v2

- name: Display build artifacts
run: ls -R artifact

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- name: Version
id: vars
run: echo ::set-output name=version::$(cat VERSION)

- name: Assemble
uses: jreleaser/release-action@v1
with:
arguments: assemble
env:
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: Release
uses: jreleaser/release-action@v1
with:
arguments: full-release
env:
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}

- name: JReleaser output
if: always()
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
out/jreleaser/release/CHANGELOG.md
123 changes: 123 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: "Release version"
required: true

jobs:
version:
name: Version
runs-on: ubuntu-latest
if: github.repository == 'kordamp/ikonli'

steps:
- name: Set release version
run: |
VERSION=${{ github.event.inputs.version }}
echo $VERSION > VERSION
git add VERSION
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Action"
git commit -a -m "Releasing version $VERSION"
git push origin master
build:
name: Build
needs: version
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- name: Build
run: ./gradlew -Prelease=true build -S

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
apps/ikonli-browser/build/distributions/ikonli-browser-*.zip
apps/ikonli-browser/build/ikonli-browser-standalone-*.zip
release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download build artifacts
uses: actions/download-artifact@v2

- name: Display build artifacts
run: ls -R artifact

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- name: Assemble
uses: jreleaser/release-action@v1
with:
arguments: assemble
env:
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}

- name: Release
uses: jreleaser/release-action@v1
with:
arguments: full-release
env:
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }
JRELEASER_TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
JRELEASER_TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
JRELEASER_TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
JRELEASER_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

- name: JReleaser output
if: always()
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
out/jreleaser/release/CHANGELOG.md
6 changes: 0 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ plugins {
id 'org.javamodularity.moduleplugin' apply false
}

project.rootProject.ext.theVersion = file('VERSION').text.trim()

allprojects { p ->
p.version = p.rootProject.ext.theVersion
}

ext.platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os

config {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jipsyVersion = 1.1.1
jacocoVersion = 0.8.6

osPluginVersion = 1.7.0
kordampPluginVersion = 0.45.0
kordampBuildVersion = 2.4.0
kordampPluginVersion = 0.46.0
kordampBuildVersion = 2.5.0
gitPluginVersion = 3.0.0
modularityPluginVersion = 1.8.2
modularityPluginVersion = 1.8.6
java9cPluginVersion = 0.2.3
jlinkPluginVersion = 2.23.7
jlinkPluginVersion = 2.24.0
miglayoutVersion = 11.0

antdesigniconsVersion = 4.0.0
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ release:
username: aalmiray
overwrite: true
sign: true
branch: master
changelog:
formatted: ALWAYS
change: '- {{commitShortHash}} {{commitTitle}}'
Expand Down Expand Up @@ -66,9 +67,7 @@ release:
- 'task'
replacers:
- search: '\[chore\] '
replace: ''
- search: '\[ikonli\-browser\] '
replace: ''

signing:
active: always
Expand Down

0 comments on commit e81ec06

Please sign in to comment.