Skip to content

Commit

Permalink
fix: Fixed release job and conda recipe (#75)
Browse files Browse the repository at this point in the history
* ci: Updated conda recipe

* ci: Fixed release job
  • Loading branch information
frgfm authored Aug 3, 2022
1 parent a812399 commit 29fa4ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 29fa4ed

Please sign in to comment.