-
Notifications
You must be signed in to change notification settings - Fork 402
64 lines (60 loc) · 1.76 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
# Always test on the latest version and some LTS.
java: [ 17, 21, 23 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew build
deply-wbsites:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true
- uses: actions/setup-node@v4
with:
# Due to some limitations of https://github.com/node-gradle/gradle-node-plugin.
node-version: '16'
- run: ./gradlew gitPublishPush
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-snapshot:
needs: build
runs-on: ubuntu-latest
if: github.repository == 'GradleUp/shadow' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true
# Disable CC due to https://github.com/gradle/gradle/issues/22779
- run: ./gradlew publish --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}