-
Notifications
You must be signed in to change notification settings - Fork 471
168 lines (167 loc) · 4.8 KB
/
release.yaml
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# This file was generated using Kotlin DSL (.github/workflows/release.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'Build and Release Spock'
on:
push:
branches:
- 'master'
tags:
- 'spock-*'
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/release.yaml'' && ''.github/workflows/release.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/release.yaml'''
build-and-verify:
name: 'Build and Verify'
runs-on: '${{ matrix.os }}'
needs:
- 'check_yaml_consistency'
if: 'github.repository == ''spockframework/spock'''
strategy:
fail-fast: false
matrix:
variant:
- '2.5'
- '3.0'
- '4.0'
java:
- '8'
- '11'
- '17'
- '21'
- '23'
os:
- 'ubuntu-latest'
exclude:
- variant: '2.5'
java: '17'
os: 'ubuntu-latest'
- variant: '2.5'
java: '21'
os: 'ubuntu-latest'
- variant: '2.5'
java: '23'
os: 'ubuntu-latest'
include:
- variant: '2.5'
java: '8'
os: 'windows-latest'
- variant: '3.0'
java: '8'
os: 'windows-latest'
- variant: '4.0'
java: '8'
os: 'windows-latest'
- variant: '2.5'
java: '8'
os: 'macos-latest'
- variant: '3.0'
java: '8'
os: 'macos-latest'
- variant: '4.0'
java: '8'
os: 'macos-latest'
steps:
- id: 'step-0'
name: 'Checkout Repository'
uses: 'actions/checkout@v4'
with:
fetch-depth: '2'
- id: 'step-1'
name: 'Set up JDKs'
uses: './.github/actions/setup-build-env'
with:
additional-java-version: '${{ matrix.java }}'
- id: 'step-2'
name: 'Build Spock'
env:
DEVELOCITY_ACCESS_KEY: '${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}'
run: './gradlew --stacktrace ghActionsBuild "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" "-Dscan.tag.main-build"'
- id: 'step-3'
name: 'Stop Daemon'
run: './gradlew --stop'
- id: 'step-4'
name: 'Upload to Codecov.io'
uses: 'codecov/codecov-action@v5'
with:
fail_ci_if_error: 'true'
release-spock:
name: 'Release Spock'
runs-on: '${{ matrix.os }}'
needs:
- 'build-and-verify'
- 'check_yaml_consistency'
strategy:
matrix:
variant:
- '2.5'
- '3.0'
- '4.0'
java:
- '8'
os:
- 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Checkout Repository'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Set up JDKs'
uses: './.github/actions/setup-build-env'
with:
additional-java-version: '${{ matrix.java }}'
- id: 'step-2'
name: 'Publish Spock'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
SONATYPE_OSS_USER: '${{ secrets.SONATYPE_OSS_USER }}'
SONATYPE_OSS_PASSWORD: '${{ secrets.SONATYPE_OSS_PASSWORD }}'
SIGNING_PASSWORD: '${{ secrets.SIGNING_GPG_PASSWORD }}'
DEVELOCITY_ACCESS_KEY: '${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}'
run: './gradlew --no-parallel --stacktrace ghActionsPublish "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" "-Dscan.tag.main-publish"'
publish-release-docs:
name: 'Publish Release Docs'
runs-on: '${{ matrix.os }}'
needs:
- 'release-spock'
- 'check_yaml_consistency'
strategy:
matrix:
variant:
- '4.0'
java:
- '21'
os:
- 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Checkout Repository'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Set up JDKs'
uses: './.github/actions/setup-build-env'
with:
additional-java-version: '${{ matrix.java }}'
- id: 'step-2'
name: 'Create Temporary Branch'
run: 'git checkout -b "docs-$GITHUB_SHA"'
- id: 'step-3'
name: 'Install GraphViz'
run: 'sudo apt update && sudo apt install --yes graphviz'
- id: 'step-4'
name: 'Publish Docs'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
DEVELOCITY_ACCESS_KEY: '${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}'
run: './gradlew --no-parallel --stacktrace ghActionsDocs "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" "-Dscan.tag.main-docs"'