Skip to content

fix dependencies

fix dependencies #4

Workflow file for this run

name: Release
on:
push:
branches:
- "master"
jobs:
check-version:
name: Check Version
runs-on: ubuntu-22.04
outputs:
local-version: ${{ steps.get-local-version.outputs.version }}
remote-version: ${{ steps.get-remote-version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Get Local Version
id: get-local-version
run: echo "version=$(python -c 'import hydra_vl4ai._version; print(hydra_vl4ai._version.__version__)')" >> $GITHUB_OUTPUT
- name: Get Remote Version
id: get-remote-version
run: echo "version=$(curl -s https://pypi.org/pypi/hydra_vl4ai/json | jq -r '.info.version')" >> $GITHUB_OUTPUT
release:
runs-on: ubuntu-22.04
needs: check-version
if: needs.check-version.outputs.local-version != needs.check-version.outputs.remote-version
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Build package for hydra_vl4ai
run: python setup.py sdist bdist_wheel
- name: Release hydra_vl4ai to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Get the version
run: |
VER=$(python -c "import hydra_vl4ai._version; print(hydra_vl4ai._version.__version__)")
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Release to GitHub Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.VERSION }}"
title: "[${{ env.VERSION }}] HYDRA Release"
prerelease: false
files: "dist/*"
draft: true