Skip to content

Deployment workflow fiddling #7

Deployment workflow fiddling

Deployment workflow fiddling #7

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: CD
on:
workflow_dispatch:
push:
branches:
- development
release:
types:
- published
jobs:
build_package:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ] #, "macos-latest", "windows-latest" ] # comment out for testing deploy
python-version: [ "3.8" ] #, "3.9", "3.10", "3.11", "3.12" ] # comment out for testing deploy
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build
- name: Build internal items
run: cd src; make
- name: Build Package
run: python -m build --wheel
- name: Upload wheels to artifact
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/*
pypi-publish:
name: Upload release to PyPI
needs: build_package
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pycifrw/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheel-*
path: dist
- name: check the dist folder
run: ls dist
- name: Publish to PyPI
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/