Merge remote-tracking branch 'origin/main' #34
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
name: stable release | |
on: [push, pull_request] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install pypi/build | |
run: >- | |
python -m | |
pip install | |
build | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
. | |
- name: Publish distribution 📦 to PyPI if Release | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
skip-existing: true | |
- name: Patch ab env with run requirements from stable recipe | |
uses: mikefarah/yq@master | |
with: | |
cmd: | | |
yq eval-all -i 'select(fi == 0).dependencies += select(fi == 1).requirements.run | select(fi == 0)' ci/conda-envs/ab.yml ci/recipe/stable/meta.yaml | |
- name: Set up conda-build environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: 3.11 | |
activate-environment: build | |
environment-file: ci/conda-envs/build.yml | |
- name: Build activity-browser stable | |
run: | | |
conda build ci/recipe/stable -c romainsacchi | |
- name: Upload to anaconda.org | |
run: | | |
anaconda -t ${{ secrets.CONDA_UPLOAD_TOKEN }} upload \ | |
/usr/share/miniconda/envs/build/conda-bld/noarch/*.tar.bz2 | |
anaconda -t ${{ secrets.CONDA_UPLOAD_TOKEN }} upload ci/conda-envs/ab.yml |