-
Notifications
You must be signed in to change notification settings - Fork 14
100 lines (84 loc) · 2.79 KB
/
main.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
- 'maintenance/*'
pull_request:
workflow_dispatch:
inputs:
publish:
description: Whether to publish the build result to Maven repositories
type: boolean
default: 'false'
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Gradle
run: |
echo "$(pwd)/rcp_resources/external_tools" >> "$GITHUB_PATH"
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build
run: |
xvfb-run ./gradlew package_fasten_safety_distribution_win build_all_languages check \
-Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
#- name: Publish test report
# uses: mikepenz/action-junit-report@v4
# if: ${{ !cancelled() }}
# with:
# fail_on_failure: true
# require_tests: true
# report_paths: 'build/**/TEST*.xml'
# github_token: ${{ secrets.GITHUB_TOKEN }}
#- name: Run migrations
# run: |
# ./gradlew migrate remigrate -x build_all_languages \
# -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
#- name: Check for dirty files
# run: |
# if [[ -n $(git status --porcelain | head --lines=1) ]]
# then
# echo "Dirty files detected after build/migration, run './gradlew migrate remigrate' and/or update .gitignore to fix:"
# git status
# echo "::group::git diff"
# git diff
# echo "::endgroup::"
# exit 1
# fi
- name: List all zip files
run: |
ls -lr
- name: Upload distribution
uses: actions/upload-artifact@v4
with:
name: fasten-distribution-win-2023.2-${{ steps.time.outputs.time }}
path: build/distributions/fasten-2023.2-SNAPSHOT-Win-2023.2-SNAPSHOT.zip
publish:
# Only publish on push (to maintenance or master) or on dispatch if requested
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish == 'true') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Publish
run: |
./gradlew publish \
-Pgpr.user=${{ github.actor }} \
-Pgpr.token=${{ secrets.GITHUB_TOKEN }} \
-Partifacts.itemis.cloud.user=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_USER }} \
-Partifacts.itemis.cloud.pw=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_PW }}