-
Notifications
You must be signed in to change notification settings - Fork 90
130 lines (110 loc) · 4.54 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: SmallRye Release
on:
pull_request:
types: [closed]
paths:
- '.github/project.yml'
jobs:
release:
runs-on: ubuntu-latest
name: release
if: ${{github.event.pull_request.merged == true}}
env:
GITHUB_TOKEN: ${{secrets.RELEASE_TOKEN}}
steps:
- uses: radcortez/project-metadata-action@main
name: retrieve project metadata
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'
- uses: actions/checkout@v4
with:
token: ${{secrets.RELEASE_TOKEN}}
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: maven cache
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: maven release ${{steps.metadata.outputs.current-version}}
run: |
java -version
gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.SECRET_PASSPHRASE}}" --output smallrye-sign.asc .github/release/smallrye-sign.asc.gpg
gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.SECRET_PASSPHRASE}}" --output maven-settings.xml .github/release/maven-settings.xml.gpg
gpg --fast-import --no-tty --batch --yes smallrye-sign.asc
git config --global user.name "SmallRye CI"
git config --global user.email "smallrye@googlegroups.com"
git checkout -b release
mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s maven-settings.xml
git checkout ${{github.base_ref}}
git rebase release
mvn -B release:perform -Prelease -s maven-settings.xml
git push
git push --tags
- name: Gradle plugin release ${{steps.metadata.outputs.current-version}}
uses: gradle/gradle-build-action@v3
with:
build-root-directory: ./tools/gradle-plugin
cache-read-only: true
arguments: publishPlugins -Pgradle.publish.key=${{secrets.GRADLE_PUBLISH_KEY}} -Pgradle.publish.secret=${{secrets.GRADLE_PUBLISH_SECRET}}
- uses: radcortez/milestone-release-action@main
name: milestone release
with:
github-token: ${{secrets.GITHUB_TOKEN}}
milestone-title: ${{steps.metadata.outputs.current-version}}
tck-reporting:
runs-on: ubuntu-latest
needs: release
strategy:
matrix:
include:
- tck-version: "2.0.1"
- tck-version: "3.0"
- tck-version: "3.1.1"
name: MicroProfile OpenAPI TCK ${{ matrix.tck-version }}
steps:
- uses: radcortez/project-metadata-action@main
name: retrieve project metadata
id: metadata
with:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'
- uses: actions/checkout@v4
name: checkout
with:
ref: ${{ steps.metadata.outputs.current-version }}
- name: maven cache
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-tck-${{ matrix.tck-version }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: actions/setup-java@v4
name: set up jdk
with:
distribution: 'temurin'
java-version: 17
- name: build with maven
run: mvn -B -pl '!testsuite/coverage,!testsuite/data,!testsuite/extra,!tools,!tools/gradle-plugin,!tools/maven-plugin,!ui,!ui/open-api-ui,!ui/open-api-ui-forms' install -DskipTests
- uses: actions/setup-java@v4
name: set up jdk
with:
distribution: 'temurin'
java-version: 11
- name: execute tck ${{ matrix.tck-version }}
run: mvn -B test -f testsuite/tck/pom.xml -Dsmallrye.commit=$(git rev-parse HEAD) -Dversion.eclipse.microprofile.openapi=${{ matrix.tck-version }}
- name: stage tck report
run: mv testsuite/tck/target/surefire-reports/microprofile-openapi-tck-report.html ./microprofile-openapi-tck-report-${{ matrix.tck-version }}.html
- uses: meeDamian/github-release@2.0
name: upload tck asset to release
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.metadata.outputs.current-version }}
allow_override: true
gzip: false
files: microprofile-openapi-tck-report-${{ matrix.tck-version }}.html