Skip to content

Build Fix

Build Fix #559

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ dev ]
workflow_dispatch:
inputs:
MANUAL_RELEASE_TRIGGERED:
description: "Environment Variable used to trigger a Maven Central release"
required: false
default: "true"
jobs:
build:
runs-on: ubuntu-18.04
steps:
# Setup
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: 3.7
# - name: Install Virtualenv
# run: pip install virtualenv
- name: Install GEOS
run: sudo apt-get install libgeos-dev
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for Github Actions Workflows
run: chmod -R ug+x .github/workflow_scripts
- name: For release builds, remove -SNAPSHOT
env:
MANUAL_RELEASE_TRIGGERED: ${{ github.event.inputs.MANUAL_RELEASE_TRIGGERED }}
run: .github/workflow_scripts/update_project_version.sh
# Quality Checks
# - name: ShellCheck PyAtlas
# run: shellcheck pyatlas/*.sh
# - name: Build PyAtlas
# run: ./gradlew cleanPyatlas buildPyatlas
- name: Quality checks (No tests)
run: ./gradlew jar check -x test -x integrationTest
- name: Tests
run: ./gradlew check build
- name: Sonar
env:
SONAR_TOKEN: 374d4e512b90257ba50c21c37202ee01af40c6a0
SONAR_PR_DECORATION_GITHUB_TOKEN: ${{ secrets.SONAR_PR_DECORATION_GITHUB_TOKEN }}
run: .github/workflow_scripts/sonar.sh
# Merge to Main
- name: Merge dev to main
env:
MERGE_TAG_GITHUB_SECRET_TOKEN: ${{ secrets.MERGE_TAG_GITHUB_SECRET_TOKEN }}
run: .github/workflow_scripts/merge-dev-to-main.sh
# Sign and Publish
- name: Decrypt GPG key (To sign artifacts)
env:
GPG_KEY_LOCATION: secring.gpg
GPG_AES256_PASSPHRASE: ${{ secrets.GPG_AES256_PASSPHRASE }}
MANUAL_RELEASE_TRIGGERED: ${{ github.event.inputs.MANUAL_RELEASE_TRIGGERED }}
run: .github/workflow_scripts/decrypt_gpg_key.sh
- name: Sign and Upload Archives
env:
GPG_KEY_LOCATION: secring.gpg
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MANUAL_RELEASE_TRIGGERED: ${{ github.event.inputs.MANUAL_RELEASE_TRIGGERED }}
run: .github/workflow_scripts/deploy.sh
- name: Tag main branch
env:
MANUAL_RELEASE_TRIGGERED: ${{ github.event.inputs.MANUAL_RELEASE_TRIGGERED }}
MERGE_TAG_GITHUB_SECRET_TOKEN: ${{ secrets.MERGE_TAG_GITHUB_SECRET_TOKEN }}
run: .github/workflow_scripts/tag-main.sh