diff --git a/.github/workflows/cwl-conformance.yaml b/.github/workflows/cwl-conformance.yaml index 45e728ca..3d85123f 100644 --- a/.github/workflows/cwl-conformance.yaml +++ b/.github/workflows/cwl-conformance.yaml @@ -36,3 +36,93 @@ jobs: env: PYTEST_MARK: ${{ matrix.mark }} run: pytest -m $PYTEST_MARK + docker: + needs: test + name: "Build Docker container" + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-qemu-action@v1 + - uses: docker/setup-buildx-action@v1 + - uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: "Get StreamFlow version" + run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV + - name: "Check if Docker image already exists" + run: echo "NEW_IMAGE=$(docker buildx imagetools inspect alphaunito/streamflow:${STREAMFLOW_VERSION} > /dev/null 2>&1; echo $?)" >> $GITHUB_ENV + - name: "Build base image" + id: docker-base + if: ${{ env.NEW_IMAGE }} + uses: docker/build-push-action@v2 + with: + build-args: | + HELM_VERSION=v3.7.2 + push: true + tags: | + alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-base + alphaunito/streamflow:latest + - name: "Build Helm 2 image" + id: docker-helm + if: ${{ env.NEW_IMAGE }} + uses: docker/build-push-action@v2 + with: + file: helm/docker/helm2/Dockerfile + build-args: | + BASE_IMAGE=alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-base + HELM_VERSION=v2.17.0 + push: true + tags: alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-helm2 + github: + needs: test + name: "Create GitHub Release" + runs-on: ubuntu-20.04 + permissions: + contents: write + steps: + - uses: actions/checkout@v2 + - name: "Get StreamFlow version" + run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV + - name: "Check tag existence" + uses: mukunku/tag-exists-action@v1.0.0 + id: check-tag + with: + tag: ${{ env.STREAMFLOW_VERSION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Create Release" + id: create-release + uses: actions/create-release@v1 + if: ${{ steps.check-tag.outputs.exists == 'false' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.STREAMFLOW_VERSION }} + release_name: ${{ env.STREAMFLOW_VERSION }} + draft: false + prerelease: false + pypi: + needs: test + name: "Publish on PyPI" + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: "Get StreamFlow version" + run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV + - name: "Get PyPI version" + run: echo "PYPI_VERSION=$(pip index versions --pre streamflow | grep streamflow | sed 's/.*(\(.*\))/\1/')" >> $GITHUB_ENV + - name: "Build Python packages" + if: ${{ env.STREAMFLOW_VERSION != env.PYPI_VERSION }} + run: | + python -m pip install build --user + python -m build --sdist --wheel --outdir dist/ . + - name: "Publish package to PyPI" + uses: pypa/gh-action-pypi-publish@release/v1 + if: ${{ env.STREAMFLOW_VERSION != env.PYPI_VERSION }} + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml deleted file mode 100644 index 8c95a1ec..00000000 --- a/.github/workflows/docker.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: "Build Docker container" -on: - workflow_run: - workflows: - - "CWL Conformance" - branches: - - 0.1.x - types: - - completed -jobs: - deploy: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: docker/setup-qemu-action@v1 - - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: "Get StreamFlow version" - run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV - - name: "Check if Docker image already exists" - run : echo "NEW_IMAGE=$(docker buildx imagetools inspect alphaunito/streamflow:${STREAMFLOW_VERSION} > /dev/null 2>&1; echo $?)" >> $GITHUB_ENV - - name: "Build base image" - id: docker-base - if: ${{ env.NEW_IMAGE }} - uses: docker/build-push-action@v2 - with: - build-args: | - HELM_VERSION=v3.7.2 - push: true - tags: | - alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-base - alphaunito/streamflow:latest - - name: "Build Helm 2 image" - id: docker-helm - if: ${{ env.NEW_IMAGE }} - uses: docker/build-push-action@v2 - with: - file: helm/docker/helm2/Dockerfile - build-args: | - BASE_IMAGE=alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-base - HELM_VERSION=v2.17.0 - push: true - tags: alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-helm2 diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml deleted file mode 100644 index e6ecd714..00000000 --- a/.github/workflows/github-release.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: "Create GitHub Release" -on: - workflow_run: - workflows: - - "CWL Conformance" - branches: - - 0.1.x - types: - - completed -jobs: - release: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - name: "Get StreamFlow version" - run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV - - name: "Check tag existence" - uses: mukunku/tag-exists-action@v1.0.0 - id: check-tag - with: - tag: ${{ env.STREAMFLOW_VERSION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: "Create Release" - id: create-release - uses: actions/create-release@v1 - if: ${{ steps.check-tag.outputs.exists == 'false' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ env.STREAMFLOW_VERSION }} - release_name: ${{ env.STREAMFLOW_VERSION }} - draft: false - prerelease: false diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml deleted file mode 100644 index ddec52f9..00000000 --- a/.github/workflows/pypi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: "Publish on PyPI" -on: - workflow_run: - workflows: - - "CWL Conformance" - branches: - - 0.1.x - types: - - completed -jobs: - publish: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: "3.8" - - name: "Get StreamFlow version" - run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV - - name: "Get PyPI version" - run: echo "PYPI_VERSION=$(pip index versions --pre streamflow | grep streamflow | sed 's/.*(\(.*\))/\1/')" >> $GITHUB_ENV - - name: "Build Python packages" - if: ${{ env.STREAMFLOW_VERSION != env.PYPI_VERSION }} - run: | - python -m pip install build --user - python -m build --sdist --wheel --outdir dist/ . - - name: "Publish package to PyPI" - uses: pypa/gh-action-pypi-publish@release/v1 - if: ${{ env.STREAMFLOW_VERSION != env.PYPI_VERSION }} - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} diff --git a/streamflow/version.py b/streamflow/version.py index f3737e0c..f6816e0d 100644 --- a/streamflow/version.py +++ b/streamflow/version.py @@ -1 +1 @@ -VERSION = "0.1.5" +VERSION = "0.1.6"