Merge pull request #7 from EichlerLab/main #9
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
# Continuous integration and delivery of the main branch. | |
name: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
# Release on Github and Docker | |
release: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout github repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
$CONDA/bin/conda install -y -c bioconda womtool | |
$CONDA/bin/conda config --add channels conda-forge | |
$CONDA/bin/conda install -y -c conda-forge miniwdl shellcheck | |
echo "$CONDA/bin" >> $GITHUB_PATH | |
- name: Test with tox | |
run: tox | |
- name: Write commit message | |
run: git log --format=%B -n 1 ${{ github.event.after }} > release_notes.txt | |
- name: Github Bumpversion Action | |
id: version-bump | |
uses: jasonamyers/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DEFAULT_BUMP: "patch" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
tags: true | |
- name: Create Github release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.version-bump.outputs.new_ver }} | |
release_name: 'v${{ steps.version-bump.outputs.new_ver }}' | |
body_path: "release_notes.txt" | |
draft: false | |
prerelease: false | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v0' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | |
- name: Build Docker images | |
run: |- | |
gcloud config set account [email protected] | |
gcloud auth configure-docker -q us.gcr.io | |
./scripts/build_docker_images.sh ${{ steps.version-bump.outputs.new_ver }} | |