Skip to content

Merge pull request #5 from SAMtoBAM/SAMtoBAM-patch-2 #125

Merge pull request #5 from SAMtoBAM/SAMtoBAM-patch-2

Merge pull request #5 from SAMtoBAM/SAMtoBAM-patch-2 #125

Workflow file for this run

name: stargraph conda build and upload
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- main # Trigger the workflow on push to the main branch
jobs:
conda-build-and-upload:
# This job runs on the latest Ubuntu runner hosted by GitHub Actions
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
# This step checks out a copy of your repository.
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: stargraph
python-version: 3.12 # Specify the version of Python you need
auto-activate-base: true
# This step sets up Miniconda with a specific Python version.
- name: Conda Build
run: |
conda config --add channels bioconda
conda config --add channels conda-forge
conda install conda-build conda-verify
conda build .
# This step installs conda-build and then uses it to build your Conda package.
- name: Upload stargraph Package
run: |
conda install -c anaconda anaconda-client
PACKAGE_FILES=($(find /usr/share/miniconda/conda-bld/linux-64/ -name "stargraph*.conda"))
NUM_FILES=${#PACKAGE_FILES[@]}
if [ "$NUM_FILES" -eq 0 ]; then
echo "Error: No stargraph package files found."
exit 1
elif [ "$NUM_FILES" -gt 1 ]; then
echo "Error: Multiple stargraph package files found."
exit 1
fi
echo "Uploading ${PACKAGE_FILES[0]}..."
ANACONDA_API_TOKEN=${{ secrets.ANACONDA_API_TOKEN }} \
conda run anaconda upload --force "${PACKAGE_FILES[0]}"
#conda run anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --force "${PACKAGE_FILES[0]}"