release #35
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: release | |
on: workflow_dispatch | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install OpenSSL | |
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config | |
- name: Set OpenSSL Environment Variables | |
run: | | |
echo "OPENSSL_DIR=/usr" >> $GITHUB_ENV | |
echo "OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu" >> $GITHUB_ENV | |
echo "OPENSSL_INCLUDE_DIR=/usr/include" >> $GITHUB_ENV | |
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_EN | |
- name: Cleanup dist directory | |
run: rm -rf dist/ | |
- name: Install maturin | |
run: pip install maturin | |
- name: Build amd64 Wheels | |
run: maturin build --release --out dist/amd64 --find-interpreter --target x86_64-unknown-linux-gnu | |
env: | |
CARGO_TERM_COLOR: always | |
- name: Build arm64 Wheels | |
run: maturin build --release --out dist/arm64 --find-interpreter --target aarch64-unknown-linux-gnu | |
env: | |
CARGO_TERM_COLOR: always | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels-linux | |
path: dist/ | |
# windows: | |
# runs-on: windows-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Install OpenSSL | |
# run: choco install openssl | |
# - name: Build and Prepare Wheels | |
# uses: messense/maturin-action@v1 | |
# with: | |
# command: build | |
# args: --release -o dist --find-interpreter | |
# - name: List built wheels | |
# run: ls dist/ | |
# - name: Upload wheels | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: wheels-windows | |
# path: dist | |
# macos: | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Install OpenSSL | |
# run: brew install openssl | |
# - name: Build and Prepare Wheels | |
# uses: messense/maturin-action@v1 | |
# with: | |
# command: build | |
# args: --release -o dist --universal2 --find-interpreter | |
# - name: List built wheels | |
# run: ls dist/ | |
# - name: Upload wheels | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: wheels-macos | |
# path: dist | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [ linux] | |
steps: | |
- name: Download all wheels (Linux) | |
uses: actions/download-artifact@v2 | |
with: | |
name: wheels-linux | |
- name: Download all wheels (Windows) | |
uses: actions/download-artifact@v2 | |
with: | |
name: wheels-windows | |
- name: Download all wheels (macOS) | |
uses: actions/download-artifact@v2 | |
with: | |
name: wheels-macos | |
- name: List all downloaded wheels | |
run: ls | |
- name: Publish to PyPI | |
uses: messense/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
with: | |
command: upload | |
args: --skip-existing * |