mirror of
https://github.com/extism/extism.git
synced 2026-01-12 07:18:02 -05:00
This workflow only _uploads_ existing artifacts, so keeping a poetry cache around just, uh, breaks the workflow since there's no `Poetry.lock` to cache.
42 lines
912 B
YAML
42 lines
912 B
YAML
name: Release Python SDK
|
|
|
|
on:
|
|
release:
|
|
types: [published, edited]
|
|
|
|
jobs:
|
|
release-sdks:
|
|
name: release-python
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install poetry
|
|
run: pipx install poetry
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: install twine
|
|
run: |
|
|
pip install twine
|
|
|
|
- name: download release
|
|
run: |
|
|
tag='${{ github.ref }}'
|
|
tag="${tag/refs\/tags\//}"
|
|
mkdir dist
|
|
cd dist
|
|
gh release download "$tag" -p 'extism_sys-*'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: upload release
|
|
run: |
|
|
twine upload dist/*
|
|
env:
|
|
TWINE_USERNAME: ${{ secrets.PYPI_API_USER }}
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|