fix: Adds release artifacts #10
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: Semantic Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
needs: [build_wheels] | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifact | |
path: dist | |
- name: Python Semantic Release | |
uses: python-semantic-release/python-semantic-release@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] # Not supporting macos due to https://github.com/stbrumme/hash-library/pull/4/files not being resolved | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.9' | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
# to supply options, put them in 'env', like: | |
# env: | |
# CIBW_SOME_OPTION: value | |
env: | |
CIBW_BUILD: "cp39-*64" | |
CIBW_BEFORE_BUILD: git submodule update --init --recursive && pip install . | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl |