Skip to content

Commit

Permalink
build: Update GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Jan 5, 2023
1 parent 90240e2 commit 48ef788
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 63 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ jobs:
if: startsWith(github.event.head_commit.message, 'Releasing version') != true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- uses: actions/cache@v2
- 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-
restore-keys: ${{ runner.os }}-gradle-

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

- name: Build
run: ./gradlew build -S
30 changes: 12 additions & 18 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
VERSION: ${{ steps.vars.outputs.VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: n1hility/cancel-previous-runs@v2
with:
Expand All @@ -39,27 +39,27 @@ jobs:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- uses: actions/cache@v2
- 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-
restore-keys: ${{ runner.os }}-gradle-

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

- name: Build
run: ./gradlew -Prelease=true build
Expand Down Expand Up @@ -93,16 +93,10 @@ jobs:
fetch-depth: 0

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

- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
uses: actions/download-artifact@v3

- name: Release
uses: jreleaser/release-action@v1
uses: jreleaser/release-action@v2
with:
version: early-access
arguments: full-release -P artifactsDir=artifacts
Expand All @@ -115,7 +109,7 @@ jobs:

- name: JReleaser output
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: jreleaser-release
path: |
Expand Down
64 changes: 34 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
VERSION: ${{ steps.vars.outputs.VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: n1hility/cancel-previous-runs@v2
with:
Expand All @@ -42,27 +42,27 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- uses: actions/cache@v2
- 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-
restore-keys: ${{ runner.os }}-gradle-

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

- name: Version
run: |
Expand All @@ -75,7 +75,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 @@ -95,32 +95,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}

- uses: actions/cache@v2
- 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-
restore-keys: ${{ runner.os }}-gradle-

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

- name: Version
run: |
Expand All @@ -133,18 +133,19 @@ jobs:
git push origin master
- name: Deploy
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
./gradlew -Prelease=true -Pfull-release=true \
-PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} \
-PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} \
build :ikonli-bom:publishToSonatype publishToSonatype closeAndReleaseSonatypeStagingRepository -S
./gradlew -Pprofile=release -PreproducibleBuild=true publish -S
- name: Upload deploy artifacts
uses: actions/upload-artifact@v3
with:
retention-days: 7
name: deploy
path: |
build/repos/local/release/
- name: Release
uses: jreleaser/release-action@v1
uses: jreleaser/release-action@v2
with:
arguments: full-release -P artifactsDir=artifacts
env:
Expand All @@ -157,12 +158,15 @@ jobs:
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 }}
JRELEASER_MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
out/jreleaser/output.properties
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ project.rootProject.gradle.addBuildListener(new BuildAdapter() {
}
}
}
})
})
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jacocoVersion = 0.8.6
zuluVersion = zulu16.30.15-ca-jdk16.0.1

osPluginVersion = 1.7.0
kordampPluginVersion = 0.46.0
kordampBuildVersion = 2.5.0
kordampPluginVersion = 0.46.6
kordampBuildVersion = 2.8.0
gitPluginVersion = 3.0.0
modularityPluginVersion = 1.8.10
jlinkPluginVersion = 2.24.4
jreleaserPluginVersion = 1.0.0-M3
jreleaserPluginVersion = 1.4.0
miglayoutVersion = 11.0

antdesigniconsVersion = 4.0.0
Expand Down
19 changes: 16 additions & 3 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ release:
changelog:
formatted: ALWAYS
preset: conventional-commits
format: '- {{commitShortHash}} {{commitTitle}}'
contributors:
format: '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}'
labelers:
Expand Down Expand Up @@ -80,12 +79,26 @@ release:
- search: 'deps: '

signing:
active: always
active: ALWAYS
armored: true

announce:
twitter:
active: release
active: RELEASE
mastodon:
host: https://mastodon.social
active: RELEASE

deploy:
maven:
nexus2:
maven-central:
active: RELEASE
url: https://s01.oss.sonatype.org/service/local
closeRepository: true
releaseRepository: true
stagingRepositories:
- build/repos/local/release

distributions:
ikonli-browser:
Expand Down

0 comments on commit 48ef788

Please sign in to comment.