Merge branch 'eclipse-2025' of github.com:atlanmod/NeoEMF into eclips… #126
This file contains hidden or 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
| # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
| name: Maven Build | |
| on: | |
| push: | |
| paths-ignore: | |
| - neoemf-doc | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build-bundles: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 22 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '22' | |
| distribution: 'temurin' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Build and install main project | |
| run: ./mvnw clean install -DskipTests | |
| - name: Build and analyze | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
| run: ./mvnw -batch-mode verify | |
| build-plugins: | |
| runs-on: ubuntu-latest | |
| needs: build-bundles | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 22 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '22' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Build plugins with Tycho | |
| run: ./mvnw --batch-mode --file plugins/eclipse install | |
| deploy-plugins: | |
| runs-on: ubuntu-latest | |
| needs: build-plugins | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '22' | |
| - name: Build Update Site with Maven/Tycho | |
| run: ./mvnw --quiet --batch-mode -f plugins/eclipse clean install | |
| # - name: Deploy to GitHub Pages | |
| # uses: peaceiris/actions-gh-pages@v3 | |
| # with: | |
| # github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # publish_dir: plugins/eclipse/releng/update/target/repository | |
| - name: Upload Update Site Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: eclipse-plugin-update-site | |
| path: plugins/eclipse/releng/update/target/repository | |
| deploy-bundles: | |
| runs-on: ubuntu-latest | |
| needs: build-bundles | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 2 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '22' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Import GPG signing key | |
| uses: crazy-max/ghaction-import-gpg@v6 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: List keys | |
| run: gpg -K | |
| ## - name: Install GPG key | |
| # run: | | |
| # cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import | |
| # gpg --list-secret-keys --keyid-format LONG | |
| - name: Publish to Central | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
| MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_PASSWORD }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| run: | | |
| ./mvnw \ | |
| --no-transfer-progress \ | |
| --batch-mode \ | |
| --activate-profiles deploy-artifacts \ | |
| --settings .util/settings.xml \ | |
| -DskipTests \ | |
| -Dgpg.keyname=${{ secrets.GPG_KEY_ID }} -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \ | |
| clean package javadoc:jar source:jar-no-fork gpg:sign install deploy |