Skip to content

Improved singleton counting (#170) #53

Improved singleton counting (#170)

Improved singleton counting (#170) #53

Workflow file for this run

name: Upload Release Tarball and Container
on:
push:
tags:
- '*' # Push events of any tag created
jobs:
build_versioned_container:
name: Build and Push versioned container
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup mamba
uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash
generate-run-shell: true
environment-file: resources/harpy.yaml
cache-environment: false
post-cleanup: 'all'
- name: Install harpy
shell: micromamba-shell {0}
run: |
python3 -m pip install --upgrade build && python3 -m build
pip install dist/*.whl
resources/buildforCI.sh
- name: Clear space
run: rm -rf /opt/hostedtoolcache
- name: Recreate container
shell: micromamba-shell {0}
run: harpy containerize
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: pdimens/harpy:${{ github.ref_name }}
build_tarball:
name: Upload Release Tarball
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Version the Container
# this removes the :latest tag and replaces with versioned container
run: |
for i in harpy/snakefiles/*.smk; do
sed -i "s/harpy\:latest/harpy\:${{ github.ref_name }}/g" $i
done
- name: Bump Harpy Version
# this removes the :latest tag and replaces with versioned container
run: |
sed -i "s/0\.0\.0/${{ github.ref_name }}/g" harpy/__main__.py
sed -i "s/0\.0\.0/${{ github.ref_name }}/g" pyproject.toml
- name: Build project
# This builds the release tarball, stripped of unneccessary things
run: |
mkdir artifacts
tar --exclude="test" --exclude=".deprecated" --exclude="artifacts" --exclude=".git" --exclude=".github" -zcvf artifacts/harpy.${{ github.ref_name }}.tar.gz .
- name: Create Release with Assets
uses: softprops/action-gh-release@v2
with:
files: ./artifacts/harpy.${{ github.ref_name }}.tar.gz