-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (76 loc) · 2.47 KB
/
build.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- "*"
permissions:
contents: read
jobs:
build:
name: "${{ matrix.os.name}}"
runs-on: ${{ matrix.os.id }}
if: ${{ github.repository == 'ciscoo/cxf-codegen-gradle' }}
strategy:
matrix:
os:
- id: ubuntu-latest
name: Linux
- id: windows-latest
name: Windows
- id: macos-latest
name: macOS
steps:
- name: Prepare Windows runner
if: ${{ runner.os == 'Windows' }}
run: |
git config --global core.autocrlf true
git config --global core.longPaths true
Stop-Service -name Docker
- name: Check Out Repository
uses: actions/checkout@v4
- name: Setup Gradle
uses: ./.github/actions/setup-gradle
- name: Run Checks
shell: bash
run: ./gradlew check
- name: Upload to Codecov.io
if: ${{ runner.os == 'Linux' }}
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run Functional Tests
shell: bash
run: ./gradlew functionalTest
publish_snapshot_artifacts:
name: Publish Snapshot Artifacts
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'ciscoo/cxf-codegen-gradle' && github.ref == 'refs/heads/master'
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Setup Gradle
uses: ./.github/actions/setup-gradle
- name: Publish
run: ./gradlew publishAllPublicationsToSonatypeSnapshotsRepository -x check
env:
ORG_GRADLE_PROJECT_sonatypeSnapshotsUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypeSnapshotsPassword: ${{ secrets.SONATYPE_PASSWORD }}
update_snapshot_documentation:
name: Update Snapshot Documentation
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'ciscoo/cxf-codegen-gradle' && github.ref == 'refs/heads/master'
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Setup Gradle
uses: ./.github/actions/setup-gradle
- name: Publish Snapshot Documentation
run: ./gradlew gitPublishPush -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false
env:
GRGIT_USER: ${{ github.actor }}
GRGIT_PASS: ${{ secrets.GH_TOKEN }}