entrypoint #9
Workflow file for this run
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: Publish | |
on: | |
push: | |
tags: | |
- "0.*" | |
branches: [ "tmp" ] | |
jobs: | |
linux: | |
runs-on: "ubuntu-latest" | |
environment: pypi | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11" ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create publish script | |
run: | | |
cat <<EOF > publish.sh | |
#!/bin/bash | |
cd "${DIR:-.}" || exit | |
maturin build --interpreter ${{ matrix.python-version }} --release --strip | |
maturin publish --interpreter ${{ matrix.python-version }} --skip-existing | |
EOF | |
chmod +x publish.sh | |
- name: Publish optrs | |
run: | | |
docker run --rm -v $(pwd):/io \ | |
-e MATURIN_PYPI_TOKEN="${{ secrets.OPT_RS_UPLOAD_TOKEN }}" \ | |
--entrypoint ./publish.sh ghcr.io/pyo3/maturin | |
- name: Publish optrs-api | |
run: | | |
docker run --rm -v $(pwd):/io \ | |
-e MATURIN_PYPI_TOKEN="${{ secrets.OPT_RS_API_UPLOAD_TOKEN }}" \ | |
-e DIR="api" \ | |
--entrypoint ./publish.sh ghcr.io/pyo3/maturin | |
#mac: | |
# runs-on: "macos-latest" | |
# environment: pypi | |
# strategy: | |
# fail-fast: true | |
# matrix: | |
# python-version: [ "3.9", "3.10", "3.11" ] | |
# arch: [ "x86_64-apple-darwin", "aarch64-apple-darwin" ] | |
# | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v3 | |
# | |
# - name: Setup Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: ${{ matrix.python-version }} | |
# | |
# - name: Install maturin | |
# run: pip install maturin | |
# | |
# - name: Create publish script | |
# run: | | |
# cat <<EOF > publish.sh | |
# #!/bin/bash | |
# maturin build --release --strip --target ${{ matrix.arch }} | |
# maturin publish --skip-existing | |
# EOF | |
# chmod +x publish.sh | |
# | |
# - name: Allow cross compiling | |
# if: ${{ matrix.arch == 'aarch64-apple-darwin' }} | |
# run: rustup target add ${{ matrix.arch }} | |
# | |
# - name: Publish optrs | |
# env: | |
# MATURIN_PYPI_TOKEN: ${{ secrets.OPT_RS_UPLOAD_TOKEN }} | |
# run: ./publish.sh | |
# | |
# - name: Publish optrs-api | |
# env: | |
# MATURIN_PYPI_TOKEN: ${{ secrets.OPT_RS_API_UPLOAD_TOKEN }} | |
# run: cd api && ../publish.sh |