Skip to content

Commit

Permalink
ci: Update Github workflows
Browse files Browse the repository at this point in the history
Use quotes and emojis in step names for easier reading.
  • Loading branch information
matrei committed Aug 8, 2024
1 parent 2bbc767 commit c76e457
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
name: Tests
name: "Tests"

on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- name: "πŸ“₯ Checkout repository"
uses: actions/checkout@v4
- name: "β˜•οΈ Set up JDK"
uses: actions/setup-java@v4
with: { java-version: 11, distribution: temurin }
- uses: gradle/actions/setup-gradle@v4
- name: "🐘 Set up Gradle"
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- run: ./gradlew check
- name: "βœ… Run tests"
run: >
./gradlew
check
19 changes: 11 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: "Release"

on:
release:
Expand All @@ -13,25 +13,28 @@ jobs:
GIT_USER_EMAIL: [email protected]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- name: "πŸ“₯ Checkout repository"
uses: actions/checkout@v4
- name: "β˜•οΈ Set up JDK"
uses: actions/setup-java@v4
with: { java-version: 11, distribution: temurin }
- uses: gradle/actions/setup-gradle@v4
- name: "🐘 Set up Gradle"
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"

- name: Get the release version from the release tag and set it in gradle.properties
- name: "πŸ”’ Get the release version from the release tag and set it in gradle.properties"
uses: matrei/github-actions/pre-release@main

- name: Generate key file for artifact signing
- name: "πŸ” Generate key file for artifact signing"
if: success()
env:
SECRING_FILE: ${{ secrets.SECRING_FILE }}
run: echo "$SECRING_FILE" | base64 -d > ${{ github.workspace }}/secring.gpg

- name: Publish release artifacts to Sonatype
- name: "πŸ“€ Publish release artifacts to Sonatype"
if: success()
env:
ORG_GRADLE_PROJECT_sonatypeOssUsername: ${{ secrets.SONATYPE_USERNAME }}
Expand All @@ -46,6 +49,6 @@ jobs:
publishToSonatype
closeAndReleaseSonatypeStagingRepository
- name: Set the next snapshot version in gradle.properties
- name: "πŸ”’ Set the next snapshot version in gradle.properties"
if: success()
uses: matrei/github-actions/post-release@main

0 comments on commit c76e457

Please sign in to comment.