Release #23
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: Release | |
on: | |
release: | |
types: [ published ] | |
branches: [ develop ] | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Determine Version | |
id: release-version | |
run: | | |
echo "full=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
SIMPLE=$(echo ${{ github.ref_name }} | sed -e s/^v//) | |
echo "simple=$SIMPLE" >> $GITHUB_OUTPUT | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ">=3.7" | |
- name: Install dependencies | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
poetry install | |
- name: Build package | |
run: poetry build | |
- name: Upload Release Asset (source distribution) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dist/upsolver_sdk_python-${{ steps.release-version.outputs.simple }}.tar.gz | |
asset_name: upsolver_sdk_python.tar.gz | |
asset_content_type: application/tar+gz | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: Upload Release Asset (built distribution) | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dist/upsolver_sdk_python-${{ steps.release-version.outputs.simple }}-py3-none-any.whl | |
asset_name: upsolver_sdk_python-${{ steps.release-version.outputs.simple }}-py3-none-any.whl | |
asset_content_type: application/whl |