-
Notifications
You must be signed in to change notification settings - Fork 470
114 lines (110 loc) · 3.75 KB
/
release.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
name: 'Build and Release Spock'
on:
push:
branches:
- master
tags:
- 'spock-*'
jobs:
build-and-verify:
runs-on: ${{ matrix.os }}
if: github.repository == 'spockframework/spock'
strategy:
fail-fast: false
matrix:
variant: ['2.5', '3.0', '4.0']
java: [ '8', '11', '17', '21', '22' ]
os: [ 'ubuntu-latest' ]
exclude:
- variant: '2.5'
java: '17'
os: 'ubuntu-latest'
- variant: '2.5'
java: '21'
os: 'ubuntu-latest'
- variant: '2.5'
java: '22'
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:
- uses: actions/checkout@v4
with:
# Codecov needs fetch-depth > 1
fetch-depth: 2
- name: 'Set up JDKs'
uses: ./.github/actions/setup-build-env
with:
additional-java-version: ${{ matrix.java }}
- 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"
- name: 'Stop Daemon'
run: |
./gradlew --stop
- name: 'Upload to Codecov.io'
uses: codecov/codecov-action@v4
release-spock:
runs-on: ${{ matrix.os }}
needs: [ 'build-and-verify' ]
strategy:
matrix:
os: [ 'ubuntu-latest' ]
variant: [ '2.5', '3.0', '4.0' ] # publish needs to be done for all versions
java: [ '8' ] # publish needs the min supported java version
steps:
- uses: actions/checkout@v4
- name: 'Set up JDKs'
uses: ./.github/actions/setup-build-env
with:
additional-java-version: ${{ matrix.java }}
- 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:
runs-on: ${{ matrix.os }}
needs: ['release-spock']
strategy:
matrix:
os: ['ubuntu-latest']
variant: ['4.0'] # docs need the highest variant
java: ['21'] # docs need the highest java version
steps:
- uses: actions/checkout@v4
- name: 'Set up JDKs'
uses: ./.github/actions/setup-build-env
with:
additional-java-version: ${{ matrix.java }}
- name: 'Create Temporary Branch'
run: |
git checkout -b "docs-$GITHUB_SHA"
- name: Install GraphViz
run: sudo apt update && sudo apt install --yes graphviz
- 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"