-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (82 loc) · 2.55 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup Webots
id: setupWebots
uses: DeepBlueRobotics/setup-webots@versioning-and-caching
with:
webotsVersion: R2023b
- name: Do the system test
uses: ./.github/actions/run-system-test
- name: Archive the example folder
uses: actions/upload-artifact@v2
if: always()
with:
name: Resulting example project for ${{ runner.os }}
path: example/
- name: Archive Webots log
uses: actions/upload-artifact@v2
if: always()
with:
name: Webots log for ${{ runner.os }}
path: webots-${{ runner.os }}.log
publish:
# Only release from the master branch
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
steps:
- name: Cancel any existing workflow runs
uses: fkirc/skip-duplicate-actions@v5
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup Webots
id: setupWebots
uses: DeepBlueRobotics/setup-webots@versioning-and-caching
with:
webotsVersion: R2023b
- name: Checkout source
uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 0
- name: Compute next semantic version
id: version
uses: paulhatch/semantic-version@v5
with:
branch: "master"
- name: Test with explicit version
run: ./gradlew :plugin:build -Pversion=${{ steps.version.outputs.version }} --info --stacktrace
- name: Tag
run: git tag ${{ steps.version.outputs.version_tag }}
- name: Push
run: git push origin ${{ steps.version.outputs.version_tag }}
- name: Publish to Gradle Plugin Portal
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: ./gradlew :plugin:publishPlugins -Pversion=${{ steps.version.outputs.version }} -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET --info --stacktrace