|
| 1 | + |
| 2 | +name: build |
| 3 | +run-name: triggered by ${{ github.actor }} |
| 4 | + |
| 5 | +on: |
| 6 | + workflow_dispatch: |
| 7 | + push: |
| 8 | + branches: [main] |
| 9 | + |
| 10 | +jobs: |
| 11 | + |
| 12 | + cli-build: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + - name: Set up JDK 21 |
| 17 | + uses: actions/setup-java@v4 |
| 18 | + with: |
| 19 | + java-version: '21' |
| 20 | + distribution: 'temurin' |
| 21 | + cache: maven |
| 22 | + |
| 23 | + - name: Build & test with Maven |
| 24 | + run: | |
| 25 | + cd CLI |
| 26 | + mvn -T 2 clean verify -B |
| 27 | +
|
| 28 | + - name: Upload build artifacts |
| 29 | + uses: actions/upload-artifact@v4 |
| 30 | + with: |
| 31 | + name: CLI |
| 32 | + compression-level: 0 # artifact is already compressed |
| 33 | + retention-days: 2 |
| 34 | + path: CLI/com.yakindu.bridges.ea.example.cli.product/target/products/*.zip |
| 35 | + |
| 36 | + |
| 37 | + addin-build: |
| 38 | + runs-on: windows-latest |
| 39 | + |
| 40 | + steps: |
| 41 | + - name: Checkout |
| 42 | + uses: actions/checkout@v4 |
| 43 | + with: |
| 44 | + fetch-depth: 0 |
| 45 | + |
| 46 | + # Install the .NET Core workload |
| 47 | + - name: Install .NET Core |
| 48 | + uses: actions/setup-dotnet@v4 |
| 49 | + with: |
| 50 | + dotnet-version: 8.0.x |
| 51 | + |
| 52 | + # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild |
| 53 | + - name: Setup MSBuild.exe |
| 54 | + uses: microsoft/setup-msbuild@v2 |
| 55 | + |
| 56 | + # Execute all unit tests in the solution |
| 57 | + #- name: Execute unit tests |
| 58 | + # run: dotnet test |
| 59 | + |
| 60 | + # Restore the application to populate the obj folder with RuntimeIdentifiers |
| 61 | + - name: Restore the application |
| 62 | + run: | |
| 63 | + cd AddIn |
| 64 | + msbuild /t:restore .\Itemis_Integrate_EA_Example_AddIn.sln /p:Configuration=Release |
| 65 | +
|
| 66 | + # Create the app package by building and packaging the project |
| 67 | + - name: Create the app package |
| 68 | + run: | |
| 69 | + cd AddIn |
| 70 | + msbuild Itemis_Integrate_EA_Example_AddIn.sln /p:Configuration=Release /p:Platform="Any CPU" /detailedsummary /v:detailed |
| 71 | +
|
| 72 | + # Upload the installer package |
| 73 | + - name: Upload build artifacts |
| 74 | + uses: actions/upload-artifact@v4 |
| 75 | + with: |
| 76 | + name: Installer |
| 77 | + path: AddIn/Itemis_Integrate_EA_Example_AddIn_Setup/bin/x86/Release/*.msi |
0 commit comments