-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since tar.gz not avaiable til finishes the release, the 2 build steps have been separated.
- Loading branch information
Showing
6 changed files
with
76 additions
and
79 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Conda Release | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["PyPI Release"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
conda-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Conda environment | ||
uses: s-weigand/setup-conda@v1 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Conda dependencies | ||
run: | | ||
set -e | ||
conda install -y anaconda-client conda-build conda-verify conda-libmamba-solver | ||
conda config --set solver libmamba | ||
conda config --set channel_priority flexible | ||
- name: Build Conda package | ||
run: | | ||
set -e | ||
cd conda | ||
conda build --user szlaura --token $ANACONDA_API_TOKEN --override-channels -c defaults -c conda-forge -c colomoto . | ||
env: | ||
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: PyPI Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
pypi-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Extract version from tag and update files | ||
run: | | ||
set -e | ||
sed -i "s:9999:${VERSION//*v/}:" setup.py conda/meta.yaml | ||
echo "Version set successfully in setup.py and conda/meta.yaml" | ||
env: | ||
VERSION: ${{ github.ref }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install PyPI dependencies | ||
run: | | ||
set -e | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
- name: Build and publish to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
set -e | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters