Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Updated the trigger for the release job #176

Merged
merged 2 commits into from
Aug 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
pypi-publish:
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -26,15 +27,14 @@ jobs:
- name: Get release tag
id: release_tag
run: |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//:1}
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
VERSION: ${{ steps.release_tag.outputs.VERSION }}
BUILD_VERSION: ${{ steps.release_tag.outputs.VERSION }}
run: |
VERSION="${VERSION:1}"
BUILD_VERSION=$VERSION python setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*

Expand All @@ -56,6 +56,7 @@ jobs:
python -c "import torchcam; print(torchcam.__version__)"

conda-publish:
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -71,13 +72,12 @@ jobs:
- name: Get release tag
id: release_tag
run: |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//:1}
- name: Build and publish
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
VERSION: ${{ steps.release_tag.outputs.VERSION }}
BUILD_VERSION: ${{ steps.release_tag.outputs.VERSION }}
run: |
export BUILD_VERSION="${VERSION:1}"
python setup.py sdist
mkdir conda-dist
conda-build .conda/ -c pytorch --output-folder conda-dist
Expand Down