Skip to content

Fix environment variable name #132

Fix environment variable name

Fix environment variable name #132

Workflow file for this run

# 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: Build
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
./mvnw --no-transfer-progress --batch-mode --define skipTests \
--activate-profiles deploy-artifacts --define gpg.keyname=${{ secrets.GPG_KEY_ID }} \
--define gpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean package
- name: Publish to Central
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
run: ./mvnw --no-transfer-progress --batch-mode --define skipTests --settings .util/settings.xml deploy