Skip to content

Merge pull request #240 from aehrc/hail_third_issue #10

Merge pull request #240 from aehrc/hail_third_issue

Merge pull request #240 from aehrc/hail_third_issue #10

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
#
# Notes:
# - we need to install pypandoc first as it is needed by pyspark setup
# - using python 3.7 because platform specific wheel for pandas 0.23.x required
# by hail is not available for python 3.8
#
name: Publish Release
on:
push:
tags:
- 'v**'
jobs:
deploy:
name: Deploy to Maven Central and PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Cache Python packages
uses: actions/cache@v2
id: pythoncache
with:
path: /home/runner/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('dev/dev-requirements.txt') }}
restore-keys: ${{ runner.os }}-pip
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip cache dir
pip install pypandoc==1.5 setuptools wheel twine
if [ -f dev/dev-requirements.txt ]; then pip install -r dev/dev-requirements.txt; fi
- name: Install GPG key
run: |
cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Configure Maven settings
uses: s4u/[email protected]
with:
servers: |
[{
"id": "ossrh",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_PASSWORD }}"
}]
- name: Build with Maven
run: |
mvn -Prelease -DskipTests=true -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" \
--batch-mode --file pom.xml \
deploy
- name: Build and publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
cd python
python setup.py sdist bdist_wheel
twine upload dist/*
create-release:
name: Draft GitHub release
runs-on: ubuntu-latest
needs: [ deploy ]
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: true