Skip to content

Merge pull request #478 from sunbeam-labs/472-452-release #22

Merge pull request #478 from sunbeam-labs/472-452-release

Merge pull request #478 from sunbeam-labs/472-452-release #22

Workflow file for this run

name: Release
on:
release:
types: [published]
workflow_dispatch:
https://github.com/sunbeam-labs/sunbeam/releases/download/v4.5.2.dev5/sunbeam.tar.gz
https://github.com/sunbeam-labs/sunbeam/releases/v4.5.2.dev5/download/sunbeam.tar.gz
jobs:
run-tests:
uses: ./.github/workflows/tests.yml
secrets: inherit
check-version:
runs-on: ubuntu-latest
outputs:
version-without-v: ${{ steps.get_version.outputs.version-without-v }}
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: s-weigand/[email protected]
- name: Install Sunbeam
shell: bash
run: |
cd $GITHUB_WORKSPACE
GIT_VERSION=$(bash install.sh -w)
echo "GIT_VERSION=$GIT_VERSION" >> $GITHUB_ENV
- id: get_version
uses: battila7/get-version-action@v2
- name: Check version
run: |
RELEASE_VERSION=${{ steps.get_version.outputs.version-without-v }}
echo "Release version: ${RELEASE_VERSION}"
echo "GitHub version: ${{ env.GIT_VERSION }}"
if [[ $RELEASE_VERSION == ${{ env.GIT_VERSION }} ]]; then
echo "Versions match, continuing..."
else
echo "Versions don't match, exiting..."
exit 1
fi
test-tarball:
name: Test Tarball
runs-on: ubuntu-latest
needs:
- run-tests
- check-version
steps:
- name: setup-conda
uses: s-weigand/[email protected]
- name: Download and Extract
shell: bash
run: |
wget https://github.com/sunbeam-labs/sunbeam/releases/download/${{ needs.check-version.outputs.version }}/sunbeam.tar.gz
mkdir sunbeam
tar -zxf sunbeam.tar.gz -C sunbeam
cd sunbeam && ./install.sh -e sunbeam
- name: Run Tests
shell: bash
run: |
source activate sunbeam
cd sunbeam
pytest -vvl tests/
push-dockerhub:
uses: ./.github/workflows/dockerhub.yml
with:
version: ${{ needs.check-version.outputs.version }}
secrets: inherit
needs:
- run-tests
- check-version
udpate-release-notes:
name: Update release notes
runs-on: ubuntu-latest
needs: push-dockerhub
steps:
- name: Add Image Reports to Release
uses: irongut/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: ${{ github.event.release.id }}
body: "### sunbeamlabs/sunbeam\n${{ needs.push-dockerhub.outputs.sunbeam_package_versions }}\n### sunbeamlabs/sunbeam:slim\n${{ needs.push-dockerhub.outputs.sunbeam_package_versions_slim }}\n### sunbeamlabs/cutadapt\n${{ needs.push-dockerhub.outputs.cutadapt_package_versions }}\n### sunbeamlabs/komplexity\n${{ needs.push-dockerhub.outputs.komplexity_package_versions }}\n### sunbeamlabs/qc\n${{ needs.push-dockerhub.outputs.qc_package_versions }}\n### sunbeamlabs/reports\n${{ needs.push-dockerhub.outputs.reports_package_versions }}"
replacebody: false
run-integration-tests:
uses: ./.github/workflows/integration-tests.yml
secrets: inherit
needs:
- push-dockerhub
- test-tarball