Skip to content

Commit

Permalink
update GitHub Actions versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ToppleTheNun committed Jan 31, 2024
1 parent 0a5ac4f commit f5e3569
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 47 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.1
uses: JetBrains/qodana-action@v2023.3.1
with:
linter: jetbrains/qodana-jvm
- uses: github/codeql-action/upload-sarif@v2
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
50 changes: 8 additions & 42 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
gradle_wrapper_validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # docs: https://github.com/actions/checkout
- uses: actions/checkout@v4 # docs: https://github.com/actions/checkout
with:
fetch-depth: '0' # https://github.com/shipkit/shipkit-auto-version#fetch-depth-on-ci
- name: Gradle wrapper validation
Expand All @@ -36,74 +36,40 @@ jobs:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3 # https://github.com/actions/checkout
uses: actions/checkout@v4 # https://github.com/actions/checkout
with:
fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3


- name: Perform Build via Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build --scan
run: ./gradlew build --scan

- name: Publish to Maven Local via Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: publishToMavenLocal --scan

run: ./gradlew publishToMavenLocal --scan

- name: Upload CodeCov Report
uses: codecov/codecov-action@v3
with:
files: "**/build/reports/jacoco/**/*.xml"

- name: Publish Plugin and Create GitHub Release via Gradle
uses: gradle/gradle-build-action@v2
# Release job, only for pushes to the main development branch
if: github.event_name == 'push'
&& github.ref == 'refs/heads/main'
&& github.repository == 'MythicDrops/mythicdrops-gradle-plugin'
&& !contains(toJSON(github.event.commits.*.message), '[skip release]')
with:
arguments: publishPlugins githubRelease --scan
run: ./gradlew publishPlugins githubRelease --scan
env:
# Gradle env variables docs: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_environment_variables
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_k2:
runs-on: ubuntu-latest
needs: [ gradle_wrapper_validation ]
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3 # https://github.com/actions/checkout
with:
fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Perform Build via Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build --scan -Pkotlin.experimental.tryK2=true
4 changes: 2 additions & 2 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
gradle_wrapper_validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # docs: https://github.com/actions/checkout
- uses: actions/checkout@v4 # docs: https://github.com/actions/checkout
with:
fetch-depth: '0' # https://github.com/shipkit/shipkit-auto-version#fetch-depth-on-ci
- name: Gradle wrapper validation
Expand All @@ -39,7 +39,7 @@ jobs:
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0
Expand Down

0 comments on commit f5e3569

Please sign in to comment.