From 29fa4ed1d4c2bfea5bf5d9251b2288a951082db0 Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:09:10 +0200 Subject: [PATCH] fix: Fixed release job and conda recipe (#75) * ci: Updated conda recipe * ci: Fixed release job --- .conda/meta.yaml | 6 ++++-- .github/workflows/release.yml | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index ade37ef..3a723a9 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -13,6 +13,7 @@ source: url: ../dist/torchscan-{{ environ.get('BUILD_VERSION') }}.tar.gz build: + number: 0 noarch: python script: python setup.py install --single-version-externally-managed --record=record.txt @@ -29,8 +30,9 @@ test: # Python imports imports: - torchscan - requires: - - python + - torchscan.modules + - torchscan.process + - torchscan.utils about: home: https://github.com/frgfm/torch-scan diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ce62cf..086443e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,14 +26,14 @@ jobs: - name: Get release tag id: release_tag run: | - echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//:1} + echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - BUILD_VERSION: ${{ steps.release_tag.outputs.VERSION }} + VERSION: ${{ steps.release_tag.outputs.VERSION }} run: | - python setup.py sdist bdist_wheel + BUILD_VERSION=${VERSION:1} python setup.py sdist bdist_wheel twine check dist/* twine upload dist/* @@ -70,13 +70,13 @@ jobs: - name: Get release tag id: release_tag run: | - echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//:1} + echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - name: Build and publish env: ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} - BUILD_VERSION: ${{ steps.release_tag.outputs.VERSION }} + VERSION: ${{ steps.release_tag.outputs.VERSION }} run: | - python setup.py sdist + BUILD_VERSION=${VERSION:1} python setup.py sdist mkdir conda-dist conda-build .conda/ -c pytorch --output-folder conda-dist ls -l conda-dist/noarch/*tar.bz2