Skip to content

Commit

Permalink
GitHub Actions: Include typings.d.ts file
Browse files Browse the repository at this point in the history
This updates the actions and adds back artifact publishing.
This also makes it so normal gradle builds do not run the kspKotlin task, as from my experience, slows down build times greatly and disallows hot swapping to debug. If you want to build and run kspKotlin at the same time, just do `gradlew build -Pfull`, or execute each task individually.
  • Loading branch information
camnwalter authored and mattco98 committed Mar 4, 2024
1 parent 2f97a3b commit f94350b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
runs-on: "ubuntu-latest"

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

- uses: actions/setup-java@v2
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand All @@ -29,16 +29,20 @@ jobs:
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew --no-daemon build

# TODO: Uncomment when we care about publishing artifacts
# - name: Get Short SHA
# id: sha
# run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

# - name: Publish Artifacts
# uses: actions/upload-artifact@v2
# with:
# name: ChatTriggers-artifacts-${{ steps.sha.outputs.sha_short }}
# path: |
# build/libs/*
run: ./gradlew --no-daemon build -Pfull

- name: Get Short SHA
id: sha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Flatten Output Directory
run: |
mkdir temp-dir
cp build/libs/* temp-dir
cp build/generated/ksp/main/resources/* temp-dir
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: ChatTriggers-artifacts-${{ steps.sha.outputs.sha_short }}
path: temp-dir
6 changes: 3 additions & 3 deletions .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
if: github.repository == 'ChatTriggers/ctjs'

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

- uses: actions/setup-java@v2
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ plugins {
alias(libs.plugins.ksp)
}

if (!project.hasProperty("full")) {
project.gradle.startParameter.excludedTaskNames.add("kspKotlin")
}

version = property("mod_version").toString()

repositories {
Expand Down

0 comments on commit f94350b

Please sign in to comment.