Write GitHub Actions scripts

This commit is contained in:
Iaroslav Postovalov 2022-03-10 22:25:17 +07:00
parent 66564457ff
commit 22e6657e79
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7
4 changed files with 52 additions and 9 deletions

30
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Gradle build
on:
push:
branches: [ dev, master ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v2
- uses: DeLaGuardo/setup-graalvm@5.0
with:
graalvm: 22.0.0.2
java: java11
arch: amd64
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: gradle/wrapper-validation-action@v1.0.4
- name: Build
run: ./gradlew build --build-cache --no-daemon --stacktrace

View File

@ -8,14 +8,26 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v2
- name: Run a one-line script
run: echo Hello, world!
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
- uses: DeLaGuardo/setup-graalvm@5.0
with:
graalvm: 22.0.0.2
java: java11
arch: amd64
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: gradle/wrapper-validation-action@v1.0.4
- name: Publish artifacts
run: >
./gradlew publishAllPublicationsToSpaceRepository --no-daemon --build-cache
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }}
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }}

1
gradle.properties Normal file
View File

@ -0,0 +1 @@
kotlin.code.style=official

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists