Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #61

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #61

Workflow file for this run

name: Build
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
workflow_dispatch:
jobs:
sdist:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Build source distribution (sdist)
run: pipx run build --sdist
- name: Upload source distribution as artifact
uses: actions/upload-artifact@v3
with:
name: tadlibcint-sdist
path: dist/*.tar.gz
wheel:
runs-on: ubuntu-latest
container: condaforge/linux-anvil-cos7-x86_64
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
defaults:
run:
shell: ${{ matrix.shell || 'bash -l {0}' }}
env:
# https://github.com/actions/checkout/issues/1809
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
# Check latest git version at https://github.com/search?q=org%3Aiusrepo+topic%3Arpm+git&s=updated&type=repositories
- name: Install Latest Git
run: |
sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
sudo yum remove git -y
sudo yum install -y git236
- name: Check Git version
run: git --version
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Create environment
run: >-
mamba create -n wheel-${{ matrix.python }}
--yes
python=${{ matrix.python }}
auditwheel
c-compiler
cxx-compiler
fortran-compiler
cffi
cmake
make
meson
ninja
numpy
pip
python-build
pkgconfig
patchelf
unzip
wheel
- name: Build wheel (bdist)
run: |
conda activate wheel-${{ matrix.python }}
set -ex
python -m build --wheel
auditwheel show dist/*.whl
auditwheel repair -w wheels --plat ${{ env.plat }} dist/*.whl
env:
plat: manylinux2014_x86_64
- name: Upload wheel as artifact
uses: actions/upload-artifact@v3
with:
name: tadlibcint-wheel-${{ matrix.python }}
path: wheels/*.whl
upload_pypi:
needs: [wheel, sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download build artifacts
uses: actions/[email protected]
with:
path: dist
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}