[MVN] Fix all configuration to point to new version/naming of 2024-06 #315
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
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path | |
name: Github Travis | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ GAMA_2024-06 ] | |
workflow_dispatch: # For manual trigger | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Adopt OpenJDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
java-package: jdk | |
- name: Update Maven to 3.9.X | |
run: | | |
# Needed for Tycho 4.X.X and support for JDK 21 | |
wget https://dlcdn.apache.org/maven/maven-3/3.9.7/binaries/apache-maven-3.9.7-bin.tar.gz | |
tar -xvf apache-maven-3.9.7-bin.tar.gz | |
mv apache-maven-3.9.7 /opt/ | |
M2_HOME='/opt/apache-maven-3.9.7' | |
PATH="$M2_HOME/bin:$PATH" | |
export PATH | |
# Overwrite PATH with updated maven install | |
echo $PATH > $GITHUB_PATH | |
echo "=== Check if well installed ===" | |
echo "$ mvn -version" | |
mvn -version | |
- name: Prepare p2 VPS access | |
run: | | |
echo "Publishing p2 repository" | |
sed -i "s/<username>GAMA_PASS/<username>$GAMA_SERVER_USERNAME/g" $GITHUB_WORKSPACE/settings.xml | |
sed -i "s/<password>GAMA_PASS/<password>$GAMA_SERVER_PASSWORD/g" $GITHUB_WORKSPACE/settings.xml | |
env: | |
GAMA_SERVER_USERNAME: ${{ secrets.GAMA_SERVER_USERNAME }} | |
GAMA_SERVER_PASSWORD: ${{ secrets.GAMA_SERVER_PASSWORD }} | |
- name: Install SSH key | |
# Consider it's a release and want to update p2 site for it | |
if: "${{ inputs.get_all_archives_for_release }}" | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.GAMA_SERVER_SSH_PRIVATE_KEY }} | |
known_hosts: ${{ secrets.GAMA_SERVER_SSH_KNOWN_HOSTS }} | |
if_key_exists: replace # replace / ignore / fail; optional (defaults to fail) | |
- name: Import JAR signing keystore | |
run: | | |
echo "$GAMA_KEYSTORE_BASE64" | base64 --decode > ~/gama.keystore | |
# Config file | |
sed -i "s/<storepass>GAMA_STORE/<storepass>$GAMA_STORE/g" $GITHUB_WORKSPACE/gama.experimental.parent/pom_footer.xml | |
env: | |
GAMA_KEYSTORE_BASE64: ${{ secrets.GAMA_KEYSTORE_BASE64 }} | |
GAMA_STORE: ${{ secrets.GAMA_KEYSTORE_STOREPASS }} | |
- name: Build with Maven | |
run: bash $GITHUB_WORKSPACE/travis_build.sh | |
env: | |
MSG: ${ github.event.head_commit.message } | |
SSH_USER_PWD: ${{ secrets.USER_PWD }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
GITHUB_TOKEN: ${{ github.token }} | |
SSHPASS: ${{ secrets.USER_PWD }} | |
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | |
TRAVIS_COMMIT: ${ GITHUB_SHA } | |
TRAVIS_EVENT_TYPE: ${{ github.event_name }} | |