feature/publish rcp as maven packages #1025
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
publish_rcp: | |
description: Whether to publish the RCP to Github packages | |
type: boolean | |
default: 'false' | |
required: true | |
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: 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 }} | |
publish_rcps: | |
# Only publish on push (to maintenance or master) or on dispatch if requested | |
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish_rcp == '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 FASTEN-Windows RCP to Github Packages | |
run: | | |
./gradlew publishFASTEN_WIN_RCPPublicationToGitHubPackagesRepository \ | |
-Pgpr.user=${{ github.actor }} \ | |
-Pgpr.token=${{ secrets.GITHUB_TOKEN }} \ | |
- name: Publish FASTEN-Linux RCPs to Github Packages | |
run: | | |
./gradlew publishFASTEN_LINUX_RCPPublicationToGitHubPackagesRepository \ | |
-Pgpr.user=${{ github.actor }} \ | |
-Pgpr.token=${{ secrets.GITHUB_TOKEN }} \ | |