Skip to content

Merge pull request #89 from BerkeleyAutomation/feat/ci #25

Merge pull request #89 from BerkeleyAutomation/feat/ci

Merge pull request #89 from BerkeleyAutomation/feat/ci #25

Workflow file for this run

name: Release To Pypi
on:
push:
branches:
- master
jobs:
build_wheels:
name: Build wheel on ${{matrix.platform}}
runs-on: ${{matrix.platform}}
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest, macos-15-intel]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v3.2.1
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: wheels-${{ matrix.platform }}
upload_pypi:
name: Release To PyPi
needs: [build_wheels]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- uses: actions/download-artifact@v4
with:
path: dist
pattern: wheels-*
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@v1.8.10
with:
password: ${{ secrets.PYPI_API_TOKEN }}
create_release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build_wheels]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Tag Version
id: set_tag
run: |
export VER=v$(python -c "exec(open('src/fcl/version.py','r').read());print(__version__)")
echo "tag_name=${VER}" >> $GITHUB_OUTPUT
- uses: actions/download-artifact@v4
with:
path: dist
pattern: wheels-*
merge-multiple: true
- uses: ncipollo/release-action@v1.14.0
with:
artifacts: "dist/*"
tag: ${{ steps.set_tag.outputs.tag_name }}