Skip to content

Commit 002127b

Browse files
committed
Merge branch 'master' into 2024.1.x
# Conflicts: # pom.xml
2 parents e8b1f09 + 47b3985 commit 002127b

3 files changed

Lines changed: 149 additions & 2 deletions

File tree

.github/workflows/build.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths-ignore:
8+
- 'LICENSE'
9+
- 'README.adoc'
10+
- 'docs/**'
11+
tags-ignore:
12+
- 'v*'
13+
workflow_dispatch:
14+
15+
jobs:
16+
17+
version:
18+
name: prepare build
19+
runs-on: ubuntu-latest
20+
outputs:
21+
BUILD_VERSION: ${{ env.BUILD_VERSION }}
22+
MAVEN_HOME: ${{ env.MAVEN_HOME }}
23+
24+
steps:
25+
- name: Set up Homebrew
26+
id: set-up-homebrew
27+
uses: Homebrew/actions/setup-homebrew@master
28+
29+
- name: checkout
30+
uses: actions/checkout@v4
31+
32+
- name: install dasel
33+
run: |
34+
brew install dasel
35+
cat $GITHUB_ENV
36+
37+
- name: extract version
38+
run: |
39+
version=`dasel -r xml -f pom.xml project.version`
40+
echo "BUILD_VERSION=${version#projectVersion=}" >> $GITHUB_ENV
41+
cat $GITHUB_ENV
42+
43+
- name: find maven home
44+
run: |
45+
maven_home=`./mvnw --version | sed -n '2p' | dasel -r yaml 'Maven home'`
46+
echo "MAVEN_HOME=${maven_home}" >> $GITHUB_ENV
47+
cat $GITHUB_ENV
48+
49+
- name: actor
50+
run: echo ${{ github.actor }} ${{ github.actor == 'hauner' }}
51+
52+
test:
53+
name: test
54+
needs: [version]
55+
56+
runs-on: ${{ matrix.os }}
57+
strategy:
58+
matrix:
59+
os: [ubuntu-latest, windows-latest]
60+
61+
steps:
62+
- name: checkout
63+
uses: actions/checkout@v4
64+
with:
65+
submodules: true
66+
67+
- name: set up jdk
68+
uses: actions/setup-java@v4
69+
with:
70+
distribution: 'temurin'
71+
java-version: 11
72+
cache: maven
73+
74+
- name: run tests
75+
run: |
76+
./mvnw --no-transfer-progress verify -D"maven.home=${{ needs.version.outputs.MAVEN_HOME }}"
77+
78+
- name: archive test results
79+
uses: actions/upload-artifact@v4
80+
if: always()
81+
with:
82+
name: test-results-${{ matrix.os }}
83+
path: 'target/**'
84+
85+
publish:
86+
if: contains(needs.version.outputs.BUILD_VERSION, 'SNAPSHOT') && github.actor == 'hauner'
87+
needs: [version, test]
88+
name: publish snapshot
89+
90+
runs-on: ubuntu-latest
91+
92+
steps:
93+
- name: checkout
94+
uses: actions/checkout@v4
95+
96+
- name: set up jdk
97+
uses: actions/setup-java@v4
98+
with:
99+
distribution: 'temurin'
100+
java-version: 11
101+
server-id: oap-snapshots
102+
server-username: PUBLISH_USER
103+
server-password: PUBLISH_KEY
104+
105+
- name: publish snapshot
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
SIGN_KEY: ${{ secrets.SIGN_KEY_ORG }}
109+
SIGN_KEY_PASS: ${{ secrets.SIGN_PWD }}
110+
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
111+
PUBLISH_KEY: ${{ secrets.PUBLISH_KEY }}
112+
run: |
113+
./mvnw --no-transfer-progress deploy

.github/workflows/release.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
9+
publish:
10+
name: publish release
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: checkout
16+
uses: actions/checkout@v4
17+
18+
- name: set up jdk
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: 'temurin'
22+
java-version: 11
23+
server-id: oap-releases
24+
server-username: PUBLISH_USER
25+
server-password: PUBLISH_KEY
26+
27+
- name: publish release
28+
env:
29+
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
30+
PUBLISH_KEY: ${{ secrets.PUBLISH_KEY }}
31+
SIGN_KEY: ${{ secrets.SIGN_KEY }}
32+
SIGN_KEY_PASS: ${{ secrets.SIGN_PWD }}
33+
run: |
34+
./mvnw deploy

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.openapiprocessor</groupId>
88
<artifactId>openapi-processor-maven-plugin</artifactId>
9-
<version>2024.1</version>
9+
<version>2024.1.1</version>
1010
<packaging>maven-plugin</packaging>
1111

1212
<name>openapi-processor Maven Plugin</name>
@@ -50,7 +50,7 @@
5050

5151
<!-- integration testing -->
5252
<maven.version>3.9.6</maven.version>
53-
<maven.home>/Users/hauner/Development/openapi/maven/apache-maven-3.9.6</maven.home>
53+
<maven.home>SET_ME</maven.home>
5454
</properties>
5555

5656
<repositories>

0 commit comments

Comments
 (0)