Skip to content

Merge pull request #1018 from ebocher/w_target_filter #187

Merge pull request #1018 from ebocher/w_target_filter

Merge pull request #1018 from ebocher/w_target_filter #187

Workflow file for this run

name: CI snapshot
on:
push:
branches: [ master ]
workflow_run:
workflows: [ "CI release" ]
branches: [ master ]
types:
- completed
workflow_dispatch:
jobs:
build:
name: Upload Snapshot
runs-on: ubuntu-latest
steps:
# Checkout the source code of the project
- name: Checkout
uses: actions/checkout@v4
# Install the GPG secret key
- name: Import GPG Key
run: |
echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import
echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --import --no-tty --batch --yes
env:
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
# Setup the jdk using version 11 of adoptOpenJDK
- name: Java setup
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
# Set up the postgis database
- name: Postigs install
uses: SPalominos/[email protected]
with:
psql_version: '9.6'
pgis_version: '2.5'
docker_image: 'postgis/postgis'
db_password: 'orbisgis'
db_user: 'orbisgis'
db_name: 'orbisgis_db'
# Deploy the snapshot
- name: Deploy
run: mvn deploy --no-transfer-progress --batch-mode
env:
MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# Build jar with dependencies
- name: Build jar with dependencies
run: mvn package -pl geoclimate-cli
# Export the last git tag into env.
- name: Export env values
run: echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
# Upload the jar with dependencies
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: geoclimate-${{ env.VERSION }}
path: |
geoclimate-cli/target/geoclimate-*.*.*-SNAPSHOT.jar