-
Notifications
You must be signed in to change notification settings - Fork 1
141 lines (130 loc) · 4.1 KB
/
pr.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: PR
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
branches: [master, main, beta]
workflow_dispatch: {}
env:
CI: "true"
GRADLE_OPTS: -Dorg.gradle.jvmargs="-XX:+UseParallelGC -Xmx3g -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=512M"
GRADLE_CACHE_LOCAL: true
GRADLE_CACHE_REMOTE: true
GRADLE_CACHE_PUSH: true
GRADLE_CACHE_USERNAME: apikey
GRADLE_CACHE_PASSWORD: ${{ secrets.BUILDLESS_APIKEY }}
CACHE_ENDPOINT: ${{ vars.CACHE_ENDPOINT_GRADLE }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
TEST_EXCEPTIONS: true
permissions:
contents: read
jobs:
build:
name: "Build and Test"
permissions:
actions: "read"
contents: "write"
id-token: "write"
checks: "write"
pull-requests: "write"
security-events: "write"
strategy:
fail-fast: false
matrix:
runner: [macOS-latest, windows-latest, ubuntu-latest]
include:
- runner: macOS-latest
flags: "--no-configuration-cache"
os: "macos"
label: "Darwin"
experimental: false
coverage: true
gvm: ${{ vars.GVM_VERSION }}
java: ${{ vars.JVM_VERSION }}
provenance: false
- runner: ubuntu-latest
flags: "--no-configuration-cache"
os: "linux"
label: "Linux"
experimental: false
coverage: true
gvm: ${{ vars.GVM_VERSION }}
java: ${{ vars.JVM_VERSION }}
provenance: true
- runner: windows-latest
flags: "--no-configuration-cache -PnodeVersion=21.6.0 -x wasmJsNodeTest -x wasmJsBrowserTest -x wasmJsTest -x wasmWasiTest -x wasmWasiNodeTest"
os: "windows"
label: "Windows"
experimental: false
coverage: true
gvm: ${{ vars.GVM_VERSION }}
java: ${{ vars.JVM_VERSION }}
provenance: false
uses: ./.github/workflows/step.build.yml
secrets: inherit
with:
runner: ${{ matrix.runner }}
os: ${{ matrix.os }}
label: ${{ matrix.label }}
flags: ${{ matrix.flags }}
experimental: ${{ matrix.experimental }}
java: ${{ matrix.java }}
coverage: ${{ matrix.coverage }}
provenance: ${{ matrix.provenance }}
codeql:
name: "Analysis: CodeQL"
needs: ["build"]
uses: ./.github/workflows/codeql.ci.yml
secrets: inherit
with: {}
permissions:
actions: read
contents: read
security-events: write
qodana:
name: "Analysis: Qodana"
needs: ["build"]
uses: ./.github/workflows/qodana.ci.yml
with: {}
secrets: inherit
permissions:
actions: read
contents: read
security-events: write
publish-sandbox:
permissions: write-all
name: "Publish: Sandbox"
needs: ["build", "codeql", "qodana"]
if: contains(github.event.pull_request.labels.*.name, 'ci:publish-snapshot')
uses: ./.github/workflows/step.publish.yml
secrets:
GOOGLE_CREDENTIALS: ${{ secrets.BUILDBOT_SERVICE_ACCOUNT }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
with:
version: 1.0-SNAPSHOT
repository: gcs://elide-snapshots/repository/v3
logLevel: info
snapshot: true
release: false
signing: true
gcs: true
environment: sandbox
label: Elide Sandbox
publish-live:
permissions: write-all
name: "Publish: Live"
if: contains(github.event.pull_request.labels.*.name, 'ci:publish') && (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true)
needs: ["build", "codeql", "qodana", "publish-sandbox"]
uses: ./.github/workflows/step.publish.yml
secrets:
PUBLISH_USER: ${{ secrets.PUBLISH_USER_CENTRAL }}
PUBLISH_PASSWORD: ${{ secrets.PUBLISH_TOKEN_CENTRAL }}
with:
repository: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
logLevel: "info"
snapshot: false
release: true
signing: true
gcs: false
environment: central
label: "Maven Central"