Skip to content

0.8.0

0.8.0 #69

Workflow file for this run

name: PyPI Publish
on:
release:
types: [created]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: "Build PyPI Package"
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/cache
- name: Build
run: |
pipx run cibuildwheel
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels_${{ github.event.release.tag_name }}
retention-days: 1
path: ./wheelhouse/*.whl
publish:
name: "Publish PyPI Package"
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels_${{ github.event.release.tag_name }}
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Publish PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
ls
twine upload *
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/cache
- name: Publish Crates
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
run: |
cargo login $CRATES_TOKEN
cargo publish
python setup.py sdist
twine upload --skip-existing dist/*
- name: Docker Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
push: true
tags: mosecorg/mosec:${{ github.ref }}
file: Dockerfile
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max